Skip to content

Commit 5fcd976

Browse files
committed
Make Cap a class
1 parent cfb4c9c commit 5fcd976

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/src/scala/caps.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ import annotation.experimental
44

55
@experimental object caps:
66

7-
opaque type Cap = Unit
7+
class Cap // should be @erased
88

99
/** The universal capture reference (deprecated) */
1010
@deprecated("Use `cap` instead")
11-
val `*`: Cap = ()
11+
val `*`: Cap = cap
1212

1313
/** The universal capture reference */
14-
val cap: Cap = ()
14+
val cap: Cap = Cap()
1515

1616
given Cap = cap
1717

18-
def capIn(scope: String): Cap = ()
18+
def capIn(scope: String): Cap = cap
1919

2020
object unsafe:
2121

0 commit comments

Comments
 (0)