diff options
-rw-r--r-- | test/files/pos/t5137.scala | 17 | ||||
-rw-r--r-- | test/files/run/t5394.scala | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/files/pos/t5137.scala b/test/files/pos/t5137.scala new file mode 100644 index 0000000000..bb72cf378f --- /dev/null +++ b/test/files/pos/t5137.scala @@ -0,0 +1,17 @@ +object Test { + + // okay + (1 * (List[BigInt]().map(((x0) => x0 match { + case x => x + })).sum)) + + // okay + ((1: BigInt) * (List[BigInt]().map({ + case x => x + }).sum)) + + // fail + (1 * (List[BigInt]().map({ + case x => x + }).sum)) +}
\ No newline at end of file diff --git a/test/files/run/t5394.scala b/test/files/run/t5394.scala new file mode 100644 index 0000000000..1b39da3ac4 --- /dev/null +++ b/test/files/run/t5394.scala @@ -0,0 +1,4 @@ +object Test extends App { + def f[T](l: List[T]): Int = l match { case x :: xs => f(xs) case Nil => 0 } + f(List.fill(10000)(0)) +}
\ No newline at end of file |