Moved tests

that are used both for codegen & diagnostics to codegen/box/diagnostics
This commit is contained in:
Svetlana Isakova
2014-11-19 14:32:09 +03:00
parent 2a83053355
commit b71260f54e
141 changed files with 612 additions and 595 deletions
@@ -0,0 +1,27 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class B {
inner class C {
tailRecursive fun h(counter : Int) {
if (counter > 0) {
this@C.h(counter - 1)
}
}
<!NO_TAIL_CALLS_FOUND!>tailRecursive fun h2(x : Any)<!> {
this@B.h2("no recursion") // keep vigilance
}
}
fun makeC() : C = C()
fun h2(x : Any) {
}
}
fun box() : String {
B().makeC().h(1000000)
B().makeC().h2(0)
return "OK"
}