Skip to content

Commit 09f27a0

Browse files
committed
Don't use @switch on a branch with a default case
As per scala/scala3#9776 (comment)
1 parent 90821af commit 09f27a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/zio/prelude/fx/ZPure.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ sealed trait ZPure[-S1, +S2, -R, +E, +A] { self =>
320320
val nested = zPure.value
321321
val continuation = zPure.continue
322322

323-
(nested.tag: @switch) match {
323+
nested.tag match {
324324
case Tags.Succeed =>
325325
val zPure2 = nested.asInstanceOf[Succeed[Any]]
326326
curZPure = continuation(zPure2.value)
@@ -333,7 +333,7 @@ sealed trait ZPure[-S1, +S2, -R, +E, +A] { self =>
333333
a = updated._2
334334
curZPure = continuation(a)
335335

336-
case Tags.FlatMap | Tags.Fail | Tags.Fold | Tags.Access | Tags.Provide =>
336+
case _ =>
337337
curZPure = nested
338338
stack.push(continuation)
339339
}

0 commit comments

Comments
 (0)