Skip to content

Commit 8edf7d9

Browse files
committed
Cleanup conditions
1 parent 2a65e96 commit 8edf7d9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ class PickleQuotes extends MacroTransform {
218218
}
219219

220220
// This and all closures in typeSplices are removed by the BetaReduce phase
221-
val typeHoles = typeSplices match
222-
case Nil => Literal(Constant(null)) // keep pickled quote without splices as small as possible
223-
case _ =>
221+
val typeHoles =
222+
if typeSplices.isEmpty then Literal(Constant(null)) // keep pickled quote without splices as small as possible
223+
else
224224
Lambda(
225225
MethodType(
226226
List(defn.IntType, defn.SeqType.appliedTo(defn.AnyType)),
@@ -234,9 +234,9 @@ class PickleQuotes extends MacroTransform {
234234
)
235235

236236
// This and all closures in termSplices are removed by the BetaReduce phase
237-
val termHoles = termSplices match
238-
case Nil => Literal(Constant(null)) // keep pickled quote without splices as small as possible
239-
case (firstSplice, _) :: _ =>
237+
val termHoles =
238+
if termSplices.isEmpty then Literal(Constant(null)) // keep pickled quote without splices as small as possible
239+
else
240240
Lambda(
241241
MethodType(
242242
List(defn.IntType, defn.SeqType.appliedTo(defn.AnyType), defn.QuoteContextClass.typeRef),

0 commit comments

Comments
 (0)