Skip to content

Commit c03c28c

Browse files
committed
WIP Extra test
1 parent 655b0a4 commit c03c28c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/neg/i2001a.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class A {
2+
def odd(x: Int) = if (x == 0) false else !even(x-1)
3+
def even(x: Int) = {
4+
def foo = {
5+
if (x == 0) true else !odd(x-1) // error: overloaded or recursive method needs result type
6+
}
7+
foo
8+
}
9+
lazy val x = {
10+
def foo = x // error
11+
foo
12+
}
13+
}

0 commit comments

Comments
 (0)