File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
compiler/src/dotty/tools/dotc/staging Expand file tree Collapse file tree 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 {
4646 case prefix : TermRef if tp.symbol.isTypeSplice =>
4747 checkNotWildcardSplice(tp)
4848 if level == 0 then tp else getTagRef(prefix)
49- case _ : NamedType | _ : ThisType | NoPrefix =>
49+ case _ : TermRef | _ : ThisType | NoPrefix =>
5050 if levelInconsistentRootOfPath(tp).exists then
5151 tryHeal(tp)
5252 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