Skip to content

Commit c9ef853

Browse files
committed
Add more tests
1 parent 353b642 commit c9ef853

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

tests/neg-custom-args/captures/i24309a.check

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import language.experimental.captureChecking
2+
trait Region[R^]
3+
def id[T](x: T): T = ???
4+
def foo[R^](r: Region[R]): Unit =
5+
val t2 = () => id[Object^{R}](???) // was error, now ok

0 commit comments

Comments
 (0)