diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-11-03 11:11:28 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-11-03 11:11:28 +1000 |
commit | c6c58071a785af3a55e7e51339461e86c58ae876 (patch) | |
tree | 5df1084d4db8b2b10dadb61be6e1cc1c87624106 /spec/_config.yml | |
parent | cae09d760d8778c03d09957786522d766430b218 (diff) | |
download | scala-c6c58071a785af3a55e7e51339461e86c58ae876.tar.gz scala-c6c58071a785af3a55e7e51339461e86c58ae876.tar.bz2 scala-c6c58071a785af3a55e7e51339461e86c58ae876.zip |
SI-8893 Test tailcall transform for mix of tail/non-tail recursion
Another excellent test suggestion by Dear Reviewer.
After tail calls, the transform results in:
```
def tick(i: Int): Unit = {
<synthetic> val _$this: Test.type = Test.this;
_tick(_$this: Test.type, i: Int){
if (i.==(0))
()
else
if (i.==(42))
{
Test.this.tick(0);
_tick(Test.this, i.-(1).asInstanceOf[Int]())
}
else
_tick(Test.this, i.-(1).asInstanceOf[Int]()).asInstanceOf[Unit]()
}
};
```
We test this by mostly exercising the tail-recursive code path with
a level of recursion that would overflow the stack if we weren't
using jumps.
Diffstat (limited to 'spec/_config.yml')
0 files changed, 0 insertions, 0 deletions