Skip to content

Commit 29a551b

Browse files
committed
Get type parameter symbol through class definition
1 parent 6e20e72 commit 29a551b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/PCPCheckAndHeal.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
112112
if (tp.isTerm)
113113
ctx.error(i"splice outside quotes", pos)
114114
tp
115-
case tp: TypeRef if tp.prefix.derivesFrom(defn.QuotedTypeClass) && tp.name.toString == "T" =>
115+
case tp: TypeRef if tp.symbol == defn.QuotedTypeClass.typeParams.head =>
116116
// Adapt direct references to the type of the type parameter T of a quoted.Type[T].
117117
// Replace it with a properly encoded type splice. This is the normal for expected for type splices.
118118
tp.prefix.select(tpnme.splice)

0 commit comments

Comments
 (0)