Skip to content

Commit 96afef1

Browse files
committed
add more tests
1 parent 18d0361 commit 96afef1

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

tests/pos/i1846.scala

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/run/i1846.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0
2+
42
3+
0
4+
0

tests/run/i1846.scala

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
object Test {
2+
def main(args: Array[String]): Unit = {
3+
val x = 42
4+
5+
x match {
6+
case {42}.toString => println(42)
7+
case _ => println(0)
8+
}
9+
10+
42 match { case { 42 } => println(42) }
11+
12+
42 match {
13+
case { 42 }.toString => println(42)
14+
case _ => println(0)
15+
}
16+
17+
"h" match {
18+
case { 42.toString } => println(42)
19+
case _ => println(0)
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)