File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments