Skip to content

Commit

Permalink
one more test case for capture checking dependent functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Linyxus committed Nov 10, 2022
1 parent 18222b7 commit 7e695fd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/neg-custom-args/captures/cc-depfun.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
trait Cap { def use(): Unit }

def main() = {
val f: (io: {*} Cap) -> {} () -> Unit =
io => () => io.use() // error

val g: ({*} Cap) -> {} () -> Unit =
io => () => io.use() // error
}

0 comments on commit 7e695fd

Please sign in to comment.