Commit 19605ee
A tweak to type improvement
When we replace Nothing by a fresh type variable, we should not accidentally
instantiate that type variable to Any in case it is still undetermined. We achieve
this by giving the type variable a slightly disguised version of Nothing which
makes the compiler believe it has a lower bound.
Fixes #21275
[Cherry-picked 053c8f9]1 parent 2b7a672 commit 19605ee
File tree
2 files changed
+19
-1
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
2 files changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments