Commit 4b90cf3
committed
Fix incorrect caching with path-dependent types
The added test case used to fail Ycheck:typer with the seemingly identicals:
Found: (a: (aa : A{type B = Int}), b: a.B): CCPoly[(aa : A{type B = Int})]
Required: (a: (aa : A{type B = Int}), b: a.B): CCPoly[(aa : A{type B = Int})]
In fact one of the `aa` is a a TypeVar instantiated to `A {type B = Int }`. The
MethodType comparison failed the signature check because the `a.B` where `a` is
backed by a type variable had a stale signature cached.
Fixed by changing `isProvisional` to traverse ParamRefs.
[Cherry-picked c32e535][modified]1 parent 1523e5f commit 4b90cf3
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 | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments