Commit b62957b
authored
Fix missing error when redeclaring type variable in nested generic class (#18883)
Closes #10479
Fixes a case where mypy doesn't warn about an inner generic class using
a type variable by the same name as an outer generic class if the inner
generic class doesn't declare the type variable using `Generic`,
`Protocol`, or PEP-695 syntax.1 parent 5c196d1 commit b62957b
File tree
4 files changed
+20
-5
lines changed- mypy
- test-data/unit
4 files changed
+20
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
356 | 360 | | |
357 | 361 | | |
358 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2374 | 2374 | | |
2375 | 2375 | | |
2376 | 2376 | | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
2377 | 2385 | | |
2378 | 2386 | | |
2379 | 2387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
| 1847 | + | |
| 1848 | + | |
1852 | 1849 | | |
1853 | 1850 | | |
1854 | 1851 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1018 | 1024 | | |
1019 | 1025 | | |
1020 | 1026 | | |
| |||
0 commit comments