Fix usages of IGNORE_BACKEND_WITHOUT_CHECK

This commit is contained in:
Zalim Bashorov
2018-04-16 23:54:56 +03:00
parent ad2ea8f999
commit 09d5a0cb89
52 changed files with 79 additions and 58 deletions
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun test(x : Int = 0, e : Any = "a") {
if (!e.equals("a")) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
open class A {
open fun foo(s: String = "OK") = s
@@ -1,6 +1,6 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun Int.foo(x: Int) {
if (x == 0) return
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun noTails()<!> {
// nothing here
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun badTails(x : Int) : Int {
if (x < 50 && x != 10 && x > 0) {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
fun withoutAnnotation(x : Int) : Int {
if (x > 0) {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec infix fun Int.test(x : Int) : Int {
if (this > 1) {
@@ -1,6 +1,6 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec infix fun Int.foo(x: Int) {
if (x == 0) return
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(counter : Int) : Int? {
if (counter < 0) return null
@@ -1,7 +1,8 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
class B {
inner class C {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(x : Int) : Int {
var z = if (x > 3) 3 else x
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(x : Int) : Int {
if (x == 1) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun <T, A> Iterator<T>.foldl(acc : A, foldFunction : (e : T, acc : A) -> A) : A =
if (!hasNext()) acc
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
fun escapeChar(c : Char) : String? = when (c) {
'\\' -> "\\\\"
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun String.repeat(num : Int, acc : StringBuilder = StringBuilder()) : String =
if (num == 0) acc.toString()
@@ -1,7 +1,8 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
bar {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
fun bar() {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
fun test() {
tailrec fun g3(counter : Int) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(x : Int) : Int {
return if (x == 1) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun foo(x: Int) {
if (x == 0) return
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
if (counter == 0) return 0
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(x : Int) : Int =
if (x == 1) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(x : Int) : Int {
if (x == 10) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(x : Int) : Int {
if (x == 0) {
@@ -1,5 +1,5 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun sum(x: Long, sum: Long): Long {
if (x == 0.toLong()) return sum
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun foo(x: Int) {
return if (x > 0) {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun foo(x: Int) {
if (x == 0) return
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(go: Boolean) : Unit<!> {
if (!go) return
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
class A {
tailrec fun f1(c : Int) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun test(x : Int) : Unit {
if (x == 1) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun withWhen(counter : Int) : Int =
when (counter) {
@@ -1,7 +1,8 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun withWhen(counter : Int, d : Any) : Int =
when (counter) {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
tailrec fun withWhen(counter : Int, d : Any) : Int =
if (counter == 0) {
@@ -1,5 +1,6 @@
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND_WITHOUT_CHECK: JS
// DONT_RUN_GENERATED_CODE: JS
// IGNORE_BACKEND: JS
tailrec fun withWhen2(counter : Int) : Int =
when {