We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa2d344 commit 82bf8fcCopy full SHA for 82bf8fc
tests/neg-custom-args/captures/refine-withFile.scala
@@ -0,0 +1,8 @@
1
+import language.experimental.captureChecking
2
+
3
+trait File
4
+val useFile: [R] -> (path: String) -> (op: File^ -> R) -> R = ???
5
+def main(): Unit =
6
+ val f: [R] -> (path: String) -> (op: File^ -> R) -> R = useFile
7
+ val g: [R] -> (path: String) -> (op: File^{f*} -> R) -> R = f // error
8
+ val leaked = g[File^{f*}]("test")(f => f) // boom
0 commit comments