We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82ed8f9 commit 7915703Copy full SHA for 7915703
tests/neg-custom-args/captures/capture-poly.scala
@@ -3,17 +3,17 @@ import caps.*
3
trait Foo extends Capability
4
5
trait CaptureSet:
6
- type C >: CapSet <: CapSet^
+ cap type C
7
8
-def capturePoly[C^](a: Foo^{C}): Foo^{C} = a
+def capturePoly[cap C](a: Foo^{C}): Foo^{C} = a
9
def capturePoly2(c: CaptureSet)(a: Foo^{c.C}): Foo^{c.C} = a
10
11
def test =
12
val x: Foo^ = ???
13
val y: Foo^ = ???
14
15
object X extends CaptureSet:
16
- type C = CapSet^{x}
+ cap type C = {x}
17
18
val z1: Foo^{X.C} = x
19
val z2: Foo^{X.C} = y // error
0 commit comments