Commit 0738db3
authored
Do not push partial types to the binder (#20202)
Fixes #19996.
This was unearthed by #19400 where `is_subtype(Partial<X>, Partial<X>)`
started returning True - before that `binder.assign_type(expr,
Partial<None>, Partial<None>)` just returned early. If I understand
correctly, that is how Partial should be handled here: we do not want to
push partials to the binder. I do not think we should add a special case
for that (both False and True make some sense for a partial type, I am
not convinced that either one is marginally better), so I just add an
explicit guard to skip adding partial types here.1 parent 7e3fd24 commit 0738db3
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3424 | 3424 | | |
3425 | 3425 | | |
3426 | 3426 | | |
3427 | | - | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
3428 | 3432 | | |
3429 | 3433 | | |
3430 | 3434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
372 | 382 | | |
373 | 383 | | |
374 | 384 | | |
| |||
0 commit comments