Commit ad4c1ce
Fix #10123: Try to fully define qualifier type
Try to fully define qualifier type before emitting an error for
a typed Select.
The one possible objection to doing this is that it might hide other
errors where a type was not sufficiently well defined before we
select on it. On the other hand:
- My comment in issue #10123 shows that the problem is more widespread
than just a single case.
- We otherwise rely on interpolation to instantiate type variables in
many cases. But interpolation is meant as an optimization only, to
keep constraint sets smaller. So, we should be prepared that interpolation
will not do its job. The fix in this commit is a way to do so.1 parent 64d9f1d commit ad4c1ce
File tree
2 files changed
+23
-0
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
2 files changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
162 | 166 | | |
163 | 167 | | |
164 | 168 | | |
| |||
| 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