Skip to content

Commit 78ef541

Browse files
committed
Add safety comment to Boundary.label
1 parent 84bc4e3 commit 78ef541

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/src/scala/util/boundary.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ object boundary:
3232

3333
/** User code should call `break.apply` instead of throwing this exception
3434
* directly.
35+
*
36+
* Note that it is **capability unsafe** to access `label` from a `Break`.
37+
* This field will be marked private in a future release.
3538
*/
3639
final class Break[T] private[boundary](val label: Label[T]^{}, val value: T)
3740
extends RuntimeException(

0 commit comments

Comments
 (0)