Commit d52ce3b
authored
Fix constructor type for subclasses of Any (#19295)
Fixes #9815
Fixes #10848
Fixes #17781
Also discovered this while working on `checkmember` stuff. Previously,
return type of the type object was the class where `__init__()` was
defined (if there was an `Any` somewhere in MRO). And since we use
return type for attribute access on type objects, it went completely
sideways. Fix is simple (we accidentally used `info` instead of
`def_info` in one place).1 parent 9f455bd commit d52ce3b
2 files changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8796 | 8796 | | |
8797 | 8797 | | |
8798 | 8798 | | |
| 8799 | + | |
| 8800 | + | |
| 8801 | + | |
| 8802 | + | |
| 8803 | + | |
| 8804 | + | |
| 8805 | + | |
| 8806 | + | |
| 8807 | + | |
| 8808 | + | |
| 8809 | + | |
| 8810 | + | |
| 8811 | + | |
| 8812 | + | |
| 8813 | + | |
| 8814 | + | |
| 8815 | + | |
| 8816 | + | |
0 commit comments