Commit 067ec20
authored
More careful type variable instance improvements (#19659)
The previous code tried to recursively apply the current instance of
FullyDefinedAccumulator to the prospective instance type. This can have
unforeseen side-effects, as i19637 shows. We now are more conservative:
We check that the prospective instance type is already fully defined
without the possibility to instantiate more type variables. This still
passes the test cases that type variable improvement solves and avoids
the problem with #19637.
Fixes #19637File tree
2 files changed
+12
-1
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments