diff options
author | VladimirNik <vladimir.nikolaev9@gmail.com> | 2016-02-18 18:10:35 +0100 |
---|---|---|
committer | VladimirNik <vladimir.nikolaev9@gmail.com> | 2016-02-18 18:11:46 +0100 |
commit | 955b04a41ccefeac6bfec0158991c152165be6eb (patch) | |
tree | 1aa3649b0997b865c9dd4c2aa02bb4a9a6e37efb /tests/neg/tailcall | |
parent | 5fc321ffaa0a0b6b997c0fdecf1a86590474d812 (diff) | |
download | dotty-955b04a41ccefeac6bfec0158991c152165be6eb.tar.gz dotty-955b04a41ccefeac6bfec0158991c152165be6eb.tar.bz2 dotty-955b04a41ccefeac6bfec0158991c152165be6eb.zip |
Adapt neg tests to new neg tests checks
Diffstat (limited to 'tests/neg/tailcall')
-rw-r--r-- | tests/neg/tailcall/t1672b.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/neg/tailcall/t1672b.scala b/tests/neg/tailcall/t1672b.scala index 2c2ec9b41..1ae3d8af8 100644 --- a/tests/neg/tailcall/t1672b.scala +++ b/tests/neg/tailcall/t1672b.scala @@ -1,6 +1,6 @@ object Test1772B { @annotation.tailrec - def bar : Nothing = { // error + def bar : Nothing = { // error: TailRec optimisation not applicable try { throw new RuntimeException } catch { @@ -11,7 +11,7 @@ object Test1772B { } @annotation.tailrec - def baz : Nothing = { // error + def baz : Nothing = { // error: TailRec optimisation not applicable try { throw new RuntimeException } catch { @@ -22,7 +22,7 @@ object Test1772B { } @annotation.tailrec - def boz : Nothing = { // error + def boz : Nothing = { // error: TailRec optimisation not applicable try { throw new RuntimeException } catch { @@ -31,7 +31,7 @@ object Test1772B { } @annotation.tailrec - def bez : Nothing = { // error + def bez : Nothing = { // error: TailRec optimisation not applicable try { bez } finally { @@ -41,12 +41,12 @@ object Test1772B { // the `liftedTree` local method will prevent a tail call here. @annotation.tailrec - def bar(i : Int) : Int = { // error + def bar(i : Int) : Int = { // error: TailRec optimisation not applicable if (i == 0) 0 else 1 + (try { throw new RuntimeException } catch { - case _: Throwable => bar(i - 1) // error + case _: Throwable => bar(i - 1) // old-error }) } } |