File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1233,10 +1233,6 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
12331233 else defn.NothingType
12341234 ref(defn.InternalQuoted_exprSplice ).appliedToTypes(List (argType, defn.QuoteContextClass .typeRef)).appliedTo(tree)
12351235 }
1236- def unapply (tree : Tree )(implicit ctx : Context ): Option [Tree ] = tree match {
1237- case Apply (fn, arg :: Nil ) if fn.symbol == defn.InternalQuoted_exprSplice => Some (arg)
1238- case _ => None
1239- }
12401236 }
12411237
12421238 /** A key to be used in a context property that tracks enclosing inlined calls */
Original file line number Diff line number Diff line change @@ -205,11 +205,11 @@ trait QuotesAndSplices {
205205 val freshTypeBindingsBuff = new mutable.ListBuffer [Tree ]
206206 val typePatBuf = new mutable.ListBuffer [Tree ]
207207 override def transform (tree : Tree )(implicit ctx : Context ) = tree match {
208- case Typed (Splice ( pat), tpt) if ! tpt.tpe.derivesFrom(defn.RepeatedParamClass ) =>
208+ case Typed (Apply (fn, pat :: Nil ), tpt) if fn.symbol == defn. InternalQuoted_exprSplice && ! tpt.tpe.derivesFrom(defn.RepeatedParamClass ) =>
209209 val tpt1 = transform(tpt) // Transform type bindings
210210 val exprTpt = AppliedTypeTree (TypeTree (defn.QuotedExprClass .typeRef), tpt1 :: Nil )
211211 transform(Splice (Typed (pat, exprTpt)))
212- case Splice ( pat) =>
212+ case Apply (fn, pat :: Nil ) if fn.symbol == defn. InternalQuoted_exprSplice =>
213213 try ref(defn.InternalQuoted_patternHole .termRef).appliedToType(tree.tpe).withSpan(tree.span)
214214 finally {
215215 val patType = pat.tpe.widen
You can’t perform that action at this time.
0 commit comments