aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tailcall
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2016-04-18 22:12:06 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2016-04-18 22:12:06 +0200
commitca47bea3eed87eaa6005161c831805cd68fd6e59 (patch)
treed745e164566a422b71347bb36513a4e8f306161a /tests/pos/tailcall
parentd4589a4c337a37fbac29449c3a8fb6a7dad85c66 (diff)
downloaddotty-ca47bea3eed87eaa6005161c831805cd68fd6e59.tar.gz
dotty-ca47bea3eed87eaa6005161c831805cd68fd6e59.tar.bz2
dotty-ca47bea3eed87eaa6005161c831805cd68fd6e59.zip
Test #1221.
Diffstat (limited to 'tests/pos/tailcall')
-rw-r--r--tests/pos/tailcall/i1221.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pos/tailcall/i1221.scala b/tests/pos/tailcall/i1221.scala
new file mode 100644
index 000000000..80dcfdc4b
--- /dev/null
+++ b/tests/pos/tailcall/i1221.scala
@@ -0,0 +1,10 @@
+import annotation.tailrec
+
+object Test{
+ final def foo(a: Int): Int = {
+ if (foo(a - 1) > 0)
+ foo(a - 1): @tailrec
+ else
+ foo(a - 2): @tailrec
+ }
+}