Skip to content

Commit 9831b97

Browse files
committed
Add test
1 parent d3383f6 commit 9831b97

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/init/neg/function-loop.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Foo {
2+
val f: Int => Foo = (x: Int) => if x > 0 then f(x) else this
3+
f(10).n
4+
5+
val n = 10 // error
6+
}

0 commit comments

Comments
 (0)