Commit 1dd8e7f
authored
Substitute type variables in return type of static methods (#16670)
`add_class_tvars` correctly instantiates type variables in the return
type for class methods but not for static methods. Check if the analyzed
member is a static method in `analyze_class_attribute_access` and
substitute the type variable in the return type in `add_class_tvars`
accordingly.
Fixes #16668.1 parent 43ffb49 commit 1dd8e7f
2 files changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1066 | 1069 | | |
1067 | 1070 | | |
1068 | 1071 | | |
1069 | 1072 | | |
1070 | | - | |
| 1073 | + | |
1071 | 1074 | | |
1072 | 1075 | | |
1073 | 1076 | | |
| |||
1177 | 1180 | | |
1178 | 1181 | | |
1179 | 1182 | | |
| 1183 | + | |
1180 | 1184 | | |
1181 | 1185 | | |
1182 | 1186 | | |
| |||
1195 | 1199 | | |
1196 | 1200 | | |
1197 | 1201 | | |
| 1202 | + | |
1198 | 1203 | | |
1199 | 1204 | | |
1200 | 1205 | | |
| |||
1220 | 1225 | | |
1221 | 1226 | | |
1222 | 1227 | | |
| 1228 | + | |
1223 | 1229 | | |
1224 | 1230 | | |
1225 | 1231 | | |
| |||
1230 | 1236 | | |
1231 | 1237 | | |
1232 | 1238 | | |
1233 | | - | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1234 | 1245 | | |
1235 | 1246 | | |
1236 | 1247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2297 | 2297 | | |
2298 | 2298 | | |
2299 | 2299 | | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
2300 | 2313 | | |
2301 | 2314 | | |
2302 | 2315 | | |
| |||
0 commit comments