Skip to content

Commit 7915703

Browse files
committed
Migrate tests to new syntax
Neg test use-capset revealed that type param clauses are incorrectly parsed when a capset parameter has an annotation.
1 parent 82ed8f9 commit 7915703

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/neg-custom-args/captures/capture-poly.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import caps.*
33
trait Foo extends Capability
44

55
trait CaptureSet:
6-
type C >: CapSet <: CapSet^
6+
cap type C
77

8-
def capturePoly[C^](a: Foo^{C}): Foo^{C} = a
8+
def capturePoly[cap C](a: Foo^{C}): Foo^{C} = a
99
def capturePoly2(c: CaptureSet)(a: Foo^{c.C}): Foo^{c.C} = a
1010

1111
def test =
1212
val x: Foo^ = ???
1313
val y: Foo^ = ???
1414

1515
object X extends CaptureSet:
16-
type C = CapSet^{x}
16+
cap type C = {x}
1717

1818
val z1: Foo^{X.C} = x
1919
val z2: Foo^{X.C} = y // error

0 commit comments

Comments
 (0)