Skip to content

Commit 076d5a7

Browse files
committed
Test that should work but does not
1 parent 8255c24 commit 076d5a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/neg-custom-args/captures/lazyvals.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Console extends SharedCapability:
1313

1414
val fun: () ->{console} String = () => x() // ok
1515
val fun2: () -> String = () => x() // error
16+
val fun3: () ->{x} String = () => x() // error but should be ok
1617

1718
println("Before accessing x")
1819
println(s"x = ${x()}")

0 commit comments

Comments
 (0)