diff options
Diffstat (limited to 'tests/run/t1333.scala')
-rw-r--r-- | tests/run/t1333.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/run/t1333.scala b/tests/run/t1333.scala new file mode 100644 index 000000000..1696629cb --- /dev/null +++ b/tests/run/t1333.scala @@ -0,0 +1,14 @@ +object Test { + case class A(x: Int)(y: Int)(z: String) + + def f(x: Any) = x match { + case A(x) => x + case _ => -1 + } + + def main(args: Array[String]): Unit = { + println(f(A(10)(20)("abc"))) + println(f(A(-10)(20)("abc"))) + println(f(List(1))) + } +} |