Commit 7269059
committed
Fix type lambda reductions involving refinements
Given:
type F[X] = Foo[X]
We've always been able to reduce `F[_]` to `Foo[_]` if `Foo` is a class.
This commit does something similar for refinements, given:
type G[X] = Bla { type R = X }
We can reduce `G[_]` to `Bar { type R }` (previously we reduced it to
`Bar { type R = Any }` which is incorrect).1 parent 95fd03e commit 7269059
File tree
2 files changed
+12
-0
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos
2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments