We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38bb5eb commit 1f3d9f5Copy full SHA for 1f3d9f5
tests/pos-custom-args/captures/i20231.scala
@@ -1,4 +1,14 @@
1
+import caps.cap
2
+
3
class Async
4
class C(val x: Async ?=> Unit)
5
def foo(x: Async ?=> Unit): C^{x} = C(x)
-def foo(x: Async ?=> Unit)(using Async): C^{x} = C(x)
6
+def foo(x: Async ?=> Unit)(using Async): C^{x} = C(x)
7
8
+// should also work for reach and read-only capabilities
9
+class D(val x: Async ?=> Unit) extends caps.Mutable
10
+def bar1(x: Async ?=> Unit): D^{cap, x*} = D(x)
11
+def bar1(x: Async ?=> Unit)(using Async): D^{cap, x*} = D(x)
12
+def bar2(x: Async ?=> Unit): D^{cap.rd, x.rd} = D(x)
13
+def bar2(x: Async ?=> Unit)(using Async): D^{cap.rd, x.rd} = D(x)
14
0 commit comments