Skip to content

Commit c29a531

Browse files
committed
Add more tests
1 parent a96b52e commit c29a531

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class Foo {
2+
3+
val a: Int = 3
4+
5+
def b: 1 = {
6+
println("1")
7+
1
8+
}
9+
10+
val c: Unit = ()
11+
12+
def foo1: Unit = a // error: A pure expression does nothing in statement position
13+
def foo2: Unit = b
14+
def foo3: Unit = c // Not addapted to { c; () } and hence c is not a statement
15+
16+
}

0 commit comments

Comments
 (0)