Commit 9be49b3
authored
Prevent crashing when
Fixes python#16793. Fixes crash in python#13666.
Previously mypy considered that variables in match/case patterns must be
Var's, causing a hard crash when a name of captured pattern clashes with
a name of some existing function. This PR removes such assumption about
Var and allows other nodes.match arms use name of existing callable (python#18449)1 parent 469b4e4 commit 9be49b3
2 files changed
+64
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5402 | 5402 | | |
5403 | 5403 | | |
5404 | 5404 | | |
5405 | | - | |
5406 | | - | |
| 5405 | + | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
5407 | 5411 | | |
5408 | 5412 | | |
5409 | 5413 | | |
5410 | 5414 | | |
5411 | 5415 | | |
5412 | | - | |
| 5416 | + | |
5413 | 5417 | | |
5414 | 5418 | | |
5415 | | - | |
| 5419 | + | |
5416 | 5420 | | |
5417 | 5421 | | |
5418 | 5422 | | |
| |||
5436 | 5440 | | |
5437 | 5441 | | |
5438 | 5442 | | |
| 5443 | + | |
| 5444 | + | |
5439 | 5445 | | |
5440 | 5446 | | |
5441 | 5447 | | |
5442 | 5448 | | |
5443 | | - | |
| 5449 | + | |
| 5450 | + | |
| 5451 | + | |
5444 | 5452 | | |
5445 | 5453 | | |
5446 | 5454 | | |
5447 | 5455 | | |
5448 | | - | |
5449 | 5456 | | |
5450 | 5457 | | |
5451 | 5458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2471 | 2471 | | |
2472 | 2472 | | |
2473 | 2473 | | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
0 commit comments