Mute without checks all diagnostic tests for tailrec since it's not supported in JS yet and it takes too much time when muted with checks
This commit is contained in:
committed by
Zalim Bashorov
parent
bde9f99d7c
commit
eda8749b91
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(x : Int = 0, e : Any = "a") {
|
||||
if (!e.equals("a")) {
|
||||
throw IllegalArgumentException()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
open class A {
|
||||
open fun foo(s: String = "OK") = s
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun Int.foo(x: Int) {
|
||||
if (x == 0) return
|
||||
return 1.foo(x - 1)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun noTails()<!> {
|
||||
// nothing here
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun badTails(x : Int) : Int {
|
||||
if (x < 50 && x != 10 && x > 0) {
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
fun withoutAnnotation(x : Int) : Int {
|
||||
if (x > 0) {
|
||||
return 1 + withoutAnnotation(x - 1)
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec infix fun Int.test(x : Int) : Int {
|
||||
if (this > 1) {
|
||||
return (this - 1) test x
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec infix fun Int.foo(x: Int) {
|
||||
if (x == 0) return
|
||||
val xx = x - 1
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(counter : Int) : Int? {
|
||||
if (counter < 0) return null
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
class B {
|
||||
inner class C {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
var z = if (x > 3) 3 else x
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
if (x == 1) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun <T, A> Iterator<T>.foldl(acc : A, foldFunction : (e : T, acc : A) -> A) : A =
|
||||
if (!hasNext()) acc
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
fun escapeChar(c : Char) : String? = when (c) {
|
||||
'\\' -> "\\\\"
|
||||
'\n' -> "\\n"
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun String.repeat(num : Int, acc : StringBuilder = StringBuilder()) : String =
|
||||
if (num == 0) acc.toString()
|
||||
else repeat(num - 1, acc.append(this))
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
|
||||
bar {
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun foo()<!> {
|
||||
fun bar() {
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
fun test() {
|
||||
tailrec fun g3(counter : Int) {
|
||||
if (counter > 0) { g3(counter - 1) }
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
return if (x == 1) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun foo(x: Int) {
|
||||
if (x == 0) return
|
||||
(return foo(x - 1))
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(counter : Int) : Int<!> {
|
||||
if (counter == 0) return 0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(x : Int) : Int =
|
||||
if (x == 1) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(x : Int) : Int {
|
||||
if (x == 10) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: 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: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun sum(x: Long, sum: Long): Long {
|
||||
if (x == 0.toLong()) return sum
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun foo(x: Int) {
|
||||
return if (x > 0) {
|
||||
(foo(x - 1))
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun foo(x: Int) {
|
||||
if (x == 0) return
|
||||
return (foo(x - 1))
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
<!NO_TAIL_CALLS_FOUND!>tailrec fun test(go: Boolean) : Unit<!> {
|
||||
if (!go) return
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
class A {
|
||||
tailrec fun f1(c : Int) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun test(x : Int) : Unit {
|
||||
if (x == 1) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun withWhen(counter : Int) : Int =
|
||||
when (counter) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun withWhen(counter : Int, d : Any) : Int =
|
||||
when (counter) {
|
||||
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun withWhen(counter : Int, d : Any) : Int =
|
||||
if (counter == 0) {
|
||||
0
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
// IGNORE_BACKEND_WITHOUT_CHECK: JS
|
||||
|
||||
tailrec fun withWhen2(counter : Int) : Int =
|
||||
when {
|
||||
|
||||
Reference in New Issue
Block a user