Commit 0007bc9
Add test demonstrating unresolved calls with class stubs
Summary:
We fail to resolve `super().__init__()` calls when the parent class is defined as `class A: ...`.
The call graph building has 2 different paths:
Using go-to-definition: this returns None (since A is empty)
Using type resolution: `super().__init__` returns a `BoundMethod[Self@B, …]`. We don’t currently handle the Self type when resolving BoundMethods. Even if we did, we would resolve to `B.__init__` instead of `A.__init__` or `object.__init__`.
Reviewed By: tianhan0
Differential Revision: D91778720
fbshipit-source-id: 4c63d4fecaa3e3a72daa501a1fc9739a60d8459f1 parent f7620c3 commit 0007bc9
1 file changed
+40
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7004 | 7004 | | |
7005 | 7005 | | |
7006 | 7006 | | |
| 7007 | + | |
| 7008 | + | |
| 7009 | + | |
| 7010 | + | |
| 7011 | + | |
| 7012 | + | |
| 7013 | + | |
| 7014 | + | |
| 7015 | + | |
| 7016 | + | |
| 7017 | + | |
| 7018 | + | |
| 7019 | + | |
| 7020 | + | |
| 7021 | + | |
| 7022 | + | |
| 7023 | + | |
| 7024 | + | |
| 7025 | + | |
| 7026 | + | |
| 7027 | + | |
| 7028 | + | |
| 7029 | + | |
| 7030 | + | |
| 7031 | + | |
| 7032 | + | |
| 7033 | + | |
| 7034 | + | |
| 7035 | + | |
| 7036 | + | |
| 7037 | + | |
| 7038 | + | |
| 7039 | + | |
| 7040 | + | |
| 7041 | + | |
| 7042 | + | |
| 7043 | + | |
| 7044 | + | |
| 7045 | + | |
| 7046 | + | |
0 commit comments