summaryrefslogtreecommitdiff
path: root/test/files/run/t8925.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-03 11:11:28 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-03 11:11:28 +1000
commitc6c58071a785af3a55e7e51339461e86c58ae876 (patch)
tree5df1084d4db8b2b10dadb61be6e1cc1c87624106 /test/files/run/t8925.check
parentcae09d760d8778c03d09957786522d766430b218 (diff)
downloadscala-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 'test/files/run/t8925.check')
0 files changed, 0 insertions, 0 deletions