Remove backend tests on old inference

Also remove any mentions of NewInference, and rename some tests.
This commit is contained in:
Alexander Udalov
2021-09-28 23:36:48 +02:00
parent 3626b1df44
commit 1071919706
179 changed files with 609 additions and 1953 deletions
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(s: String = "kotlin", vararg t: String): Boolean {
if (s != "kotlin") throw AssertionError(s)
if (t.size != 0) throw AssertionError(t.size.toString())
@@ -1,4 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(vararg a: String, result: String = "OK"): String =
if (a.size == 0) result else "Fail"
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(x: String, y: Char = 'K'): String = x + y
fun <T, U> call(f: (T) -> U, x: T): U = f(x)
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(x: String = "O", vararg y: String): String =
if (y.size == 0) x + "K" else "Fail"
@@ -1,6 +1,5 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: STDLIB_TEXT
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
// WITH_RUNTIME
inline fun foo(mkString: () -> String): String =
@@ -1,6 +1,5 @@
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: IGNORED_IN_JS
// !LANGUAGE: +NewInference
// WITH_RUNTIME
inline fun foo(mkString: (Char, Char) -> String): String =
@@ -10,4 +9,4 @@ fun bar (vararg xs: Char) =
xs.concatToString()
fun box(): String = foo(::bar)
// -> { a, b -> bar(a, b) }
// -> { a, b -> bar(a, b) }
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(vararg l: Long, s: String = "OK"): String =
if (l.size == 0) s else "Fail"
@@ -1,4 +1,3 @@
// !LANGUAGE: +NewInference
// WITH_RUNTIME
inline fun foo(x: (Int, Int) -> Int): Int =
@@ -1,6 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
class Outer(val o: String) {
inner class Inner1(val i: Int, vararg v: String) {
val result = "I1" + o + i + if (v.size == 0) "E" else v[0]
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference
fun foo(
f: (
Int, Int, Int, Int, Int, Int, Int, Int, Int, Int,
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun call0(f: (String) -> String, x: String): String = f(x)
fun call1(f: (String, String) -> String, x: String, y: String): String = f(x, y)
fun call2(f: (String, String, String) -> String, x: String, y: String, z: String): String = f(x, y, z)
@@ -27,4 +25,4 @@ fun box(): String {
val r3 = call2(::bar, "8", "9", "10")
if (r3 != "7829") return "FAIL3 $r3"
return "OK"
}
}
@@ -1,4 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(x: String, y: String = "K"): String = x + y
fun call(f: (String) -> String, x: String): String = f(x)
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference
fun foo(x: String, vararg y: String): String =
if (y.size == 0) x + "K" else "Fail"
@@ -1,4 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
// WITH_RUNTIME
import kotlin.test.assertEquals
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference
fun sum(vararg args: Int): Int {
var result = 0
for (arg in args)
@@ -1,5 +1,3 @@
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
fun foo(x: Int, s: Int, vararg y: CharSequence = arrayOf("Aaa")): String =
if (y.size == s && y[0].length == x) "OK" else "Fail"