File tree 3 files changed +25
-1
lines changed
compiler/src/dotty/tools/dotc/staging
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class HealType(pos: SrcPos)(using Context) extends TypeMap {
46
46
case prefix : TermRef if tp.symbol.isTypeSplice =>
47
47
checkNotWildcardSplice(tp)
48
48
if level == 0 then tp else getTagRef(prefix)
49
- case _ : NamedType | _ : ThisType | NoPrefix =>
49
+ case _ : TermRef | _ : ThisType | NoPrefix =>
50
50
if levelInconsistentRootOfPath(tp).exists then
51
51
tryHeal(tp)
52
52
else
Original file line number Diff line number Diff line change
1
+ import scala .quoted .*
2
+
3
+ trait OuterTrait {
4
+ trait X
5
+ }
6
+
7
+ def exampleMacro [T <: OuterTrait : Type ](expr : Expr [T ])(using Quotes ): Expr [OuterTrait # X ] = {
8
+ ' {
9
+ val prefix : T = $ { expr }
10
+ new prefix.X {}
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ import scala .quoted .*
2
+
3
+ trait OuterTrait { self =>
4
+ trait X
5
+
6
+ def exampleMacro [T <: self.type : Type ](expr : Expr [T ])(using Quotes ): Expr [self.X ] = {
7
+ ' {
8
+ val prefix : T = $ { expr }
9
+ new prefix.X {}
10
+ }
11
+ }
12
+ }
You can’t perform that action at this time.
0 commit comments