Skip to content

Commit 25b0571

Browse files
Merge pull request #9508 from dotty-staging/fix-#9465
Fix #9465: Add missing recursion
2 parents 64cecda + f6d4874 commit 25b0571

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ trait QuotesAndSplices {
401401
override def apply(tp: Type): Type = tp match {
402402
case tp: TypeRef =>
403403
val tp1 = if (tp.typeSymbol.isTypeSplice) tp.dealias else tp
404-
typeBindings.get(tp1.typeSymbol).fold(tp)(_.symbol.typeRef)
404+
mapOver(typeBindings.get(tp1.typeSymbol).fold(tp)(_.symbol.typeRef))
405405
case tp => mapOver(tp)
406406
}
407407
}

tests/pos-macros/i9465.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import scala.quoted._
2+
3+
trait Coll[A] {
4+
type C[X] // must be abstract
5+
def map[B]: C[Any] // needs both the type param and a return type that refers to C
6+
}
7+
8+
object QuoteTest {
9+
def compile(expr: Expr[Any])(using QuoteContext): Expr[Any] = expr match {
10+
case '{ (??? : Coll[$y]).map[$b] } => ???
11+
}
12+
}

0 commit comments

Comments
 (0)