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 13e4439 commit 20917c7Copy full SHA for 20917c7
tests/neg-custom-args/captures/capset-bound.scala
@@ -0,0 +1,18 @@
1
+import caps.*
2
+
3
+class IO
4
5
+case class File(io: IO^)
6
7
+def test(io1: IO^, io2: IO^) =
8
+ def f[C >: CapSet^{io1} <: CapSet^](file: File^{C^}) = ???
9
+ val f1: File^{io1} = ???
10
+ val f2: File^{io2} = ???
11
+ val f3: File^{io1, io2} = ???
12
+ f[CapSet^{io1}](f1)
13
+ f[CapSet^{io1}](f2) // error
14
+ f[CapSet^{io1}](f3) // error
15
+ f[CapSet^{io2}](f2) // error
16
+ f[CapSet^{io1, io2}](f1)
17
+ f[CapSet^{io1, io2}](f2)
18
+ f[CapSet^{io1, io2}](f3)
tests/neg-custom-args/captures/i21868.scala
@@ -0,0 +1,14 @@
+import caps.
+trait AbstractWrong:
+ type C <: CapSet
+ def boom(): Unit^{C^} // error
+trait Abstract:
+ type C <: CapSet^
+ def boom(): Unit^{C^}
+class Concrete extends Abstract:
+ type C = Nothing
+ def boom() = () // error
0 commit comments