Commit 06b5684
committed
Avoid creation of
The type declarations annotated with `@SplicedType` are only meant for
types that come from outside the quote. If the reference to the `Type[T]`
is to a definition within the quote (i.e. its level is grater than 0) we
can use it directly. The `@SplicedType` for that type will be generated
in a future compilation phase when the `Type[T]` definition reaches
level 0.
Fixes #17026@SplicedType quote local refrences1 parent f1bc0fb commit 06b5684
File tree
3 files changed
+14
-2
lines changed- compiler/src/dotty/tools/dotc/staging
- tests/pos-macros
3 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
| 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 | + | |
0 commit comments