diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-04-18 22:19:38 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-04-18 22:19:38 +0200 |
commit | 7cd8257730563d4b8671b2d342d35a5952119205 (patch) | |
tree | 7a7b59d489dc3c37f3468bb2768caf2363da62b0 /tests | |
parent | d8bad7adaba9af5083bf8b92454fb50dfb48b925 (diff) | |
download | dotty-7cd8257730563d4b8671b2d342d35a5952119205.tar.gz dotty-7cd8257730563d4b8671b2d342d35a5952119205.tar.bz2 dotty-7cd8257730563d4b8671b2d342d35a5952119205.zip |
Add neg-test for method with @tailrec callsites that is not final.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/tailcall/i1221b.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/neg/tailcall/i1221b.scala b/tests/neg/tailcall/i1221b.scala new file mode 100644 index 000000000..f8e2add9a --- /dev/null +++ b/tests/neg/tailcall/i1221b.scala @@ -0,0 +1,10 @@ +import annotation.tailrec + +class Test { + def foo(a: Int): Int = { // error: method is not final + if ((foo(a - 1): @tailrec) > 0) + foo(a - 1): @tailrec + else + foo(a - 2): @tailrec + } +} |