Commit 6d6da11
committed
Fix mapping of annotations
We previously did not do an (expensive) TreeTypeMap on an annotation if the mapped versions
of all types of subtrees of the annotation tree were =:= to the original types. But it turns
out this is too coarse. In the test we have capture set variables where we intend to map a
TypeRef to a TypeParamRef but the two were considered as =:= because of the bounds they had.
So no mapping took place.
We now use `eql` instead of =:=, which is structural comparison with `eq` for references to
corresponding binders.1 parent a50a1e4 commit 6d6da11
File tree
5 files changed
+19
-1
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos-custom-args/captures/setup
5 files changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6322 | 6322 | | |
6323 | 6323 | | |
6324 | 6324 | | |
| 6325 | + | |
| 6326 | + | |
6325 | 6327 | | |
6326 | 6328 | | |
6327 | 6329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments