Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ trait QuotesAndSplices {
override def apply(tp: Type): Type = tp match {
case tp: TypeRef =>
val tp1 = if (tp.typeSymbol.isTypeSplice) tp.dealias else tp
typeBindings.get(tp1.typeSymbol).fold(tp)(_.symbol.typeRef)
mapOver(typeBindings.get(tp1.typeSymbol).fold(tp)(_.symbol.typeRef))
case tp => mapOver(tp)
}
}
Expand Down
12 changes: 12 additions & 0 deletions tests/pos-macros/i9465.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import scala.quoted._

trait Coll[A] {
type C[X] // must be abstract
def map[B]: C[Any] // needs both the type param and a return type that refers to C
}

object QuoteTest {
def compile(expr: Expr[Any])(using QuoteContext): Expr[Any] = expr match {
case '{ (??? : Coll[$y]).map[$b] } => ???
}
}