Skip to content

Commit 12047d8

Browse files
committed
Classify existential variables as root capabilities
Allows some simplifications in the zoo of classification methods.
1 parent 33ef293 commit 12047d8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
import language.experimental.captureChecking
3+
import language.experimental.modularity
34
import caps.*
45

56
case class A()
@@ -10,10 +11,10 @@ trait HasCap:
1011
object HasCap:
1112
def apply[T](body: HasCap^ ?=> T): T = ???
1213

13-
class Box(using h: HasCap^):
14+
class Box(using tracked val h: HasCap^):
1415
var t: A^{h} = h.mkA
1516

1617
def main() =
17-
HasCap: h ?=>
18-
val b = Box(using h)
19-
b.t = h.mkA
18+
HasCap: h1 ?=>
19+
val b = Box(using h1)
20+
b.t = h1.mkA

0 commit comments

Comments
 (0)