Skip to content

Commit cf8daf0

Browse files
oderskysjrd
andauthored
Apply suggestions from code review
Co-authored-by: Sébastien Doeraene <[email protected]>
1 parent 2e3c4cf commit cf8daf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/scala/util/boundary.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ object boundary:
1818
/** User code should call `break.apply` instead of throwing this exception
1919
* directly.
2020
*/
21-
class Break[T] private[boundary](val label: Label[T], val value: T)
21+
final class Break[T] private[boundary](val label: Label[T], val value: T)
2222
extends RuntimeException(
2323
/*message*/ null, /*cause*/ null, /*enableSuppression=*/ false, /*writableStackTrace*/ false)
2424

2525
/** Labels are targets indicating which boundary will be exited by a `break`.
2626
*/
2727
final class Label[-T]:
28-
def break(value: T): Nothing = throw Break(this, value)
28+
private[util] def break(value: T): Nothing = throw Break(this, value)
2929

3030
/** Run `body` with freshly generated label as implicit argument. Catch any
3131
* breaks associated with that label and return their results instead of

0 commit comments

Comments
 (0)