summaryrefslogtreecommitdiff
path: root/test/files/run/t8893b.scala
Commit message (Collapse)AuthorAgeFilesLines
* Fix 27 typos (p-r)Janek Bogucki2015-06-301-1/+1
|
* SI-8893 Test tailcall transform for mix of tail/non-tail recursionJason Zaugg2014-11-031-0/+15
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.