Skip to content

Commit 678696b

Browse files
committed
Add run and pos test for #1503
1 parent 4a3ff68 commit 678696b

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

tests/pos/i1503.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
object Test {
2+
(
3+
new Function0[Unit] {
4+
def apply() = println("hello")
5+
})()
6+
}

tests/run/i1503.check

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
working

tests/run/i1503.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
object Test {
2+
def main(args: Array[String]): Unit = {
3+
(new Function0[Unit] {
4+
def apply() = println("working")
5+
})()
6+
}
7+
}

0 commit comments

Comments
 (0)