@@ -400,11 +400,8 @@ trait QuotesAndSplices {
400400 * },
401401 * true, // If there is at least one type splice. Used to instantiate the context with or without GADT constraints
402402 * x$2 // tasty.Reflection instance
403- * ): Expr[S & List[t] @unchecked] => ...
403+ * ) => ...
404404 * ```
405- *
406- * For a scrutinee of type `S`, the `: Expr[S & List[t] @unchecked]` tells the pattern that if the pattern matched the bound
407- * scrutinee `x @ '{..}` is of type `Expr[S & List[t] @unchecked]`.
408405 */
409406 private def typedQuotePattern (tree : untpd.Quote , pt : Type , qctx : Tree )(using Context ): Tree = {
410407 if tree.quoted.isTerm && ! pt.derivesFrom(defn.QuotedExprClass ) then
@@ -472,12 +469,10 @@ trait QuotesAndSplices {
472469 val matchModule = if tree.quoted.isTerm then defn.QuoteMatching_ExprMatch else defn.QuoteMatching_TypeMatch
473470 val unapplyFun = qctx.asInstance(defn.QuoteMatchingClass .typeRef).select(matchModule).select(nme.unapply)
474471
475- Typed (
476- UnApply (
477- fun = unapplyFun.appliedToTypeTrees(typeBindingsTuple :: TypeTree (patType) :: Nil ),
478- implicits = quotedPattern :: Nil ,
479- patterns = splicePat :: Nil ),
480- TypeTree (quoteClass.typeRef.appliedTo(replaceBindings(quoted1.tpe) & quotedPt))
481- ).annotated(New (defn.UncheckedAnnot .typeRef, Nil ))
472+ UnApply (
473+ fun = unapplyFun.appliedToTypeTrees(typeBindingsTuple :: TypeTree (patType) :: Nil ),
474+ implicits = quotedPattern :: Nil ,
475+ patterns = splicePat :: Nil ,
476+ proto = quoteClass.typeRef.appliedTo(replaceBindings(quoted1.tpe) & quotedPt))
482477 }
483478}
0 commit comments