Skip to content

Commit 7d3597e

Browse files
committed
Simplify boundary.apply
1 parent efc9035 commit 7d3597e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/run/errorhandling/break.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ object boundary:
1111
transparent inline def apply[T <: R, R](inline body: Label[T] ?=> R): R =
1212
val local = Label[T]()
1313
try body(using local)
14-
catch case ex: Break[_] if ex.label eq local =>
15-
ex.value.asInstanceOf[T]
14+
catch case ex: Break[T] @unchecked if ex.label eq local =>
15+
ex.value
1616

1717
end boundary
1818

0 commit comments

Comments
 (0)