Commit e46d751
Ignore selection prototypes when typing type applications
Ignore selection prototypes at first when typing type applications.
If we need them later for overloading disambiguation, reveal the ignored
type.
The reason for doing this is that a selection might come from an extension method,
and in this case we should not require the selected name as a member of the result.
This change breaks one test (overloading-specifity-2.scala) that explicitly
tested that we don't consult implicit arguments for disambiguation since the
expected type was a selection that already determined the outcome. This is logic
no longer holds. We have to see whether this change breaks any code in practice.
Fixes #23773
[Cherry-picked 30aa805]1 parent 144b12f commit e46d751
File tree
6 files changed
+32
-5
lines changed- compiler/src/dotty/tools/dotc
- core
- printing
- typer
- tests
- neg
- pos
6 files changed
+32
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
1957 | 1962 | | |
1958 | 1963 | | |
1959 | 1964 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | | - | |
| 1425 | + | |
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
| |||
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
1449 | | - | |
1450 | 1449 | | |
1451 | 1450 | | |
1452 | 1451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
| |||
620 | 623 | | |
621 | 624 | | |
622 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
623 | 629 | | |
624 | 630 | | |
625 | 631 | | |
| |||
734 | 740 | | |
735 | 741 | | |
736 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
737 | 746 | | |
738 | 747 | | |
739 | 748 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments