We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2753a17 commit ee906a1Copy full SHA for ee906a1
compiler/src/dotty/tools/dotc/staging/HealType.scala
@@ -46,7 +46,7 @@ class HealType(pos: SrcPos)(using Context) extends TypeMap {
46
case prefix: TermRef if tp.symbol.isTypeSplice =>
47
checkNotWildcardSplice(tp)
48
if level == 0 then tp else getTagRef(prefix)
49
- case _: NamedType | _: ThisType | NoPrefix =>
+ case _: TermRef | _: ThisType | NoPrefix =>
50
if levelInconsistentRootOfPath(tp).exists then
51
tryHeal(tp)
52
else
tests/pos-macros/i17293.scala
@@ -0,0 +1,12 @@
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
0 commit comments