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 {
1233
1233
else defn.NothingType
1234
1234
ref(defn.InternalQuoted_exprSplice ).appliedToTypes(List (argType, defn.QuoteContextClass .typeRef)).appliedTo(tree)
1235
1235
}
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
- }
1240
1236
}
1241
1237
1242
1238
/** A key to be used in a context property that tracks enclosing inlined calls */
Original file line number Diff line number Diff line change @@ -201,11 +201,11 @@ trait QuotesAndSplices {
201
201
val freshTypeBindingsBuff = new mutable.ListBuffer [Tree ]
202
202
val typePatBuf = new mutable.ListBuffer [Tree ]
203
203
override def transform (tree : Tree )(implicit ctx : Context ) = tree match {
204
- case Typed (Splice ( pat), tpt) if ! tpt.tpe.derivesFrom(defn.RepeatedParamClass ) =>
204
+ case Typed (Apply (fn, pat :: Nil ), tpt) if fn.symbol == defn. InternalQuoted_exprSplice && ! tpt.tpe.derivesFrom(defn.RepeatedParamClass ) =>
205
205
val tpt1 = transform(tpt) // Transform type bindings
206
206
val exprTpt = AppliedTypeTree (TypeTree (defn.QuotedExprClass .typeRef), tpt1 :: Nil )
207
207
transform(Splice (Typed (pat, exprTpt)))
208
- case Splice ( pat) =>
208
+ case Apply (fn, pat :: Nil ) if fn.symbol == defn. InternalQuoted_exprSplice =>
209
209
try ref(defn.InternalQuoted_patternHole .termRef).appliedToType(tree.tpe).withSpan(tree.span)
210
210
finally {
211
211
val patType = pat.tpe.widen
You can’t perform that action at this time.
0 commit comments