File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -440,16 +440,15 @@ trait QuotesAndSplices {
440
440
val matchModule = if quoted.isTerm then defn.QuoteMatching_ExprMatch else defn.QuoteMatching_TypeMatch
441
441
val unapplyFun = quotes.asInstance(defn.QuoteMatchingClass .typeRef).select(matchModule).select(nme.unapply)
442
442
443
- val res = UnApply (
443
+ val patternUnapply = UnApply (
444
444
fun = unapplyFun.appliedToTypeTrees(typeBindingsTuple :: TypeTree (patType) :: Nil ),
445
445
implicits = quotedPattern :: Nil ,
446
446
patterns = splicePat :: Nil ,
447
447
proto = quoteClass.typeRef.appliedTo(replaceBindings(quoted1.tpe)))
448
448
449
- val decoded = QuotePatterns .decode(res )
449
+ val decoded = QuotePatterns .decode(patternUnapply )
450
450
decoded.foreach(QuotePatterns .checkPattern)
451
- val encoded = decoded.map(QuotePatterns .encode).getOrElse(res)
452
-
453
- res
451
+ val encoded = decoded.map(QuotePatterns .encode).getOrElse(patternUnapply)
452
+ encoded
454
453
}
455
454
}
You can’t perform that action at this time.
0 commit comments