@@ -7,20 +7,23 @@ import annotation.experimental
77 /** The universal capture reference */
88 val `*` : Any = ()
99
10- /** If argument is of type `cs T`, converts to type `box cs T`. This
11- * avoids the error that would be raised when boxing `*`.
12- */
13- extension [T ](x : T ) def unsafeBox : T = x
10+ object unsafe :
1411
15- /** If argument is of type `box cs T`, converts to type `cs T`. This
16- * avoids the error that would be raised when unboxing `*`.
17- */
18- extension [T ](x : T ) def unsafeUnbox : T = x
12+ /** If argument is of type `cs T`, converts to type `box cs T`. This
13+ * avoids the error that would be raised when boxing `*`.
14+ */
15+ extension [T ](x : T ) def unsafeBox : T = x
1916
20- /** If argument is of type `box cs T`, converts to type `cs T`. This
21- * avoids the error that would be raised when unboxing `*`.
22- */
23- extension [T , U ](f : T => U ) def unsafeBoxFunArg : T => U = f
17+ /** If argument is of type `box cs T`, converts to type `cs T`. This
18+ * avoids the error that would be raised when unboxing `*`.
19+ */
20+ extension [T ](x : T ) def unsafeUnbox : T = x
21+
22+ /** If argument is of type `box cs T`, converts to type `cs T`. This
23+ * avoids the error that would be raised when unboxing `*`.
24+ */
25+ extension [T , U ](f : T => U ) def unsafeBoxFunArg : T => U = f
26+ end unsafe
2427
2528 /** Mixing in this trait forces a trait or class to be pure, i.e.
2629 * have no capabilities retained in its self type.
0 commit comments