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 33ef293 commit 12047d8Copy full SHA for 12047d8
tests/pending/pos/classcaps.scala renamed to tests/pos-custom-args/captures/i22723.scala
@@ -1,5 +1,6 @@
1
2
import language.experimental.captureChecking
3
+import language.experimental.modularity
4
import caps.*
5
6
case class A()
@@ -10,10 +11,10 @@ trait HasCap:
10
11
object HasCap:
12
def apply[T](body: HasCap^ ?=> T): T = ???
13
-class Box(using h: HasCap^):
14
+class Box(using tracked val h: HasCap^):
15
var t: A^{h} = h.mkA
16
17
def main() =
- HasCap: h ?=>
18
- val b = Box(using h)
19
- b.t = h.mkA
+ HasCap: h1 ?=>
+ val b = Box(using h1)
20
+ b.t = h1.mkA
0 commit comments