File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1975,8 +1975,8 @@ class Typer extends Namer
19751975 patBuf += pat1
19761976 }
19771977 case ddef : ValOrDefDef =>
1978- if (ddef.symbol.annotations.exists(_.symbol == defn.InternalQuoted_patternBindHoleAnnot )) {
1979- val tpe = ddef.symbol.info match {
1978+ if (ddef.symbol.hasAnnotation( defn.InternalQuoted_patternBindHoleAnnot )) {
1979+ val bindingType = ddef.symbol.info match {
19801980 case t : ExprType => t.resType
19811981 case t : MethodType => t.toFunctionType()
19821982 case t : PolyType =>
@@ -1985,9 +1985,9 @@ class Typer extends Namer
19851985 x => t.resType.subst(t, x).toFunctionType())
19861986 case t => t
19871987 }
1988- val exprTpe = AppliedType (defn.QuotedMatchingBindingType , tpe :: Nil )
1989- val sym = ctx0.newPatternBoundSymbol(ddef.name, exprTpe , ddef.span)
1990- patBuf += Bind (sym, untpd.Ident (nme.WILDCARD ).withType(exprTpe )).withSpan(ddef.span)
1988+ val bindingExprTpe = AppliedType (defn.QuotedMatchingBindingType , bindingType :: Nil )
1989+ val sym = ctx0.newPatternBoundSymbol(ddef.name, bindingExprTpe , ddef.span)
1990+ patBuf += Bind (sym, untpd.Ident (nme.WILDCARD ).withType(bindingExprTpe )).withSpan(ddef.span)
19911991 }
19921992 super .transform(tree)
19931993 case _ =>
You can’t perform that action at this time.
0 commit comments