Skip to content

Commit de3fa6a

Browse files
committed
Fix #7603 again
1 parent 6f04d8e commit de3fa6a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,13 @@ trait QuotesAndSplices {
190190
patBuf += pat1
191191
}
192192
case Select(pat, _) if tree.symbol == defn.QuotedType_splice =>
193-
val sym = tree.tpe.dealias.typeSymbol.asType
194-
val tdef = TypeDef(sym).withSpan(sym.span)
195-
freshTypeBindingsBuff += transformTypeBindingTypeDef(tdef, freshTypePatBuf)
196-
TypeTree(tree.tpe.dealias).withSpan(tree.span)
197-
193+
val sym = tree.tpe.dealias.typeSymbol
194+
if sym.exists then
195+
val tdef = TypeDef(sym.asType).withSpan(sym.span)
196+
freshTypeBindingsBuff += transformTypeBindingTypeDef(tdef, freshTypePatBuf)
197+
TypeTree(tree.tpe.dealias).withSpan(tree.span)
198+
else
199+
tree
198200
case ddef: ValOrDefDef =>
199201
if (ddef.symbol.hasAnnotation(defn.InternalQuoted_patternBindHoleAnnot)) {
200202
val bindingType = ddef.symbol.info match {

0 commit comments

Comments
 (0)