diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-04-18 22:12:06 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-04-18 22:12:06 +0200 |
commit | ca47bea3eed87eaa6005161c831805cd68fd6e59 (patch) | |
tree | d745e164566a422b71347bb36513a4e8f306161a /tests/neg | |
parent | d4589a4c337a37fbac29449c3a8fb6a7dad85c66 (diff) | |
download | dotty-ca47bea3eed87eaa6005161c831805cd68fd6e59.tar.gz dotty-ca47bea3eed87eaa6005161c831805cd68fd6e59.tar.bz2 dotty-ca47bea3eed87eaa6005161c831805cd68fd6e59.zip |
Test #1221.
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/tailcall/i1221.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/neg/tailcall/i1221.scala b/tests/neg/tailcall/i1221.scala new file mode 100644 index 000000000..5c3286e97 --- /dev/null +++ b/tests/neg/tailcall/i1221.scala @@ -0,0 +1,10 @@ +import annotation.tailrec + +object Test{ + final def foo(a: Int): Int = { + if ((foo(a - 1): @tailrec) > 0) // error: not in tail position + foo(a - 1): @tailrec + else + foo(a - 2): @tailrec + } +} |