aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tailcall
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2016-10-23 14:34:34 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2016-10-23 14:34:34 +0200
commit20cbcca0ec49a3d4de1021d261cc4a35d242925b (patch)
tree7f3bb5f12b9d16e3c78d402b3277b978463837d9 /tests/pos/tailcall
parentbcb652bc562caadc828ad42236c6d267481fd751 (diff)
downloaddotty-20cbcca0ec49a3d4de1021d261cc4a35d242925b.tar.gz
dotty-20cbcca0ec49a3d4de1021d261cc4a35d242925b.tar.bz2
dotty-20cbcca0ec49a3d4de1021d261cc4a35d242925b.zip
Test that #1614 remains fixed.
Diffstat (limited to 'tests/pos/tailcall')
-rw-r--r--tests/pos/tailcall/i1614.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pos/tailcall/i1614.scala b/tests/pos/tailcall/i1614.scala
new file mode 100644
index 000000000..4c10e963d
--- /dev/null
+++ b/tests/pos/tailcall/i1614.scala
@@ -0,0 +1,9 @@
+object Foobar {
+ def apply(): Option[String] = {
+ def foobar[A](f: (String, String) => A): List[A] = List[String]() match {
+ case _ :: ls => foobar(f)
+ }
+ foobar((a1, a2) => (a1 + a2)).headOption
+ }
+}
+