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 353b642 commit c9ef853Copy full SHA for c9ef853
tests/neg-custom-args/captures/i24309a.check
tests/neg-custom-args/captures/i24309a.scala
@@ -0,0 +1,4 @@
1
+import language.experimental.captureChecking
2
+def runOps[C^](ops: List[() ->{C} Unit]): Unit = ???
3
+def runOps1[C^](xs: Object^{C}): Unit = runOps[{C}](???) // ok
4
+def runOps2[C^](): Unit = runOps[{C}](???) // error
tests/pos-custom-args/captures/i24309.scala
@@ -0,0 +1,5 @@
+trait Region[R^]
+def id[T](x: T): T = ???
+def foo[R^](r: Region[R]): Unit =
5
+ val t2 = () => id[Object^{R}](???) // was error, now ok
0 commit comments