Commit d5fec8f
authored
Ignore selection prototypes when typing type applications (#24489)
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 logic no longer holds. We have to see
whether this change breaks any code in practice.
Fixes #23773File tree
7 files changed
+72
-9
lines changed- compiler/src/dotty/tools/dotc
- core
- printing
- typer
- tests
- neg
- pos
7 files changed
+72
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1956 | 1956 | | |
1957 | 1957 | | |
1958 | 1958 | | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
1959 | 1964 | | |
1960 | 1965 | | |
1961 | 1966 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
359 | 363 | | |
360 | 364 | | |
361 | 365 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 165 | + | |
| 166 | + | |
168 | 167 | | |
169 | 168 | | |
170 | 169 | | |
171 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
182 | 199 | | |
183 | 200 | | |
184 | 201 | | |
| |||
286 | 303 | | |
287 | 304 | | |
288 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
289 | 309 | | |
290 | 310 | | |
291 | 311 | | |
| |||
620 | 640 | | |
621 | 641 | | |
622 | 642 | | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
623 | 646 | | |
624 | 647 | | |
625 | 648 | | |
| |||
734 | 757 | | |
735 | 758 | | |
736 | 759 | | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
737 | 763 | | |
738 | 764 | | |
739 | 765 | | |
| |||
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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments