Skip to content

Commit 7e695fd

Browse files
committed
one more test case for capture checking dependent functions
1 parent 18222b7 commit 7e695fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
trait Cap { def use(): Unit }
2+
3+
def main() = {
4+
val f: (io: {*} Cap) -> {} () -> Unit =
5+
io => () => io.use() // error
6+
7+
val g: ({*} Cap) -> {} () -> Unit =
8+
io => () => io.use() // error
9+
}

0 commit comments

Comments
 (0)