Commit 822a29c
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.
[Cherry-picked 6d6da11]1 parent 2dbead6 commit 822a29c
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 | |
|---|---|---|---|
| |||
5967 | 5967 | | |
5968 | 5968 | | |
5969 | 5969 | | |
| 5970 | + | |
| 5971 | + | |
5970 | 5972 | | |
5971 | 5973 | | |
5972 | 5974 | | |
| |||
| 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