Commit 041aa5d
authored
Document undesirable generator expression behavior in test and fix one case (#20594)
Adds a test case to explicitly demonstrate behavior which I believe has
the same root cause as #18026
The short explanation is that if _any_ get produced while inferring the
type of a generator expression which is being passed to an overloaded
function, the overload will be considered failed, even if the error has
no effect on the inferred type of the generator expression.
One experiment to try that might address this could be to only fail the
overload if the inferred type contains `AnyType(TypeOfAny.from_error)`.
For now, only fix the specific case where the "error" is a `reveal_type`
note.1 parent 33c0d0a commit 041aa5d
2 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2918 | 2918 | | |
2919 | 2919 | | |
2920 | 2920 | | |
2921 | | - | |
| 2921 | + | |
2922 | 2922 | | |
2923 | 2923 | | |
2924 | 2924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1456 | 1456 | | |
1457 | 1457 | | |
1458 | 1458 | | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1459 | 1480 | | |
1460 | 1481 | | |
1461 | 1482 | | |
| |||
0 commit comments