Commit cc0ff7a
Avoid using the current denotation in NamedType.disambiguate
While recalculating denotation in NamedType we might call
NamedType.disambiguate which uses a denotation to decide about
the correct overloaded method. Using current denotation here might cause
stale symbol errors, so instead we use the lastKnownDenotation,
which should be enough for the use case here, as targetName should not
change between phases/runs.
Later in the denotation recalculation a similar thing happens with
SourceLanguage.apply, where we also now avoid using currentDenotation,
as whether the symbol comes from java or Scala 2 should
also not change between phases/runs.
[Cherry-picked 6e58d25]1 parent 75dff09 commit cc0ff7a
File tree
7 files changed
+53
-4
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos-macros/i20574
7 files changed
+53
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
949 | | - | |
| 949 | + | |
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
31 | | - | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2421 | 2421 | | |
2422 | 2422 | | |
2423 | 2423 | | |
2424 | | - | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
2425 | 2428 | | |
2426 | 2429 | | |
2427 | 2430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments