Remove backend tests on old inference
Also remove any mentions of NewInference, and rename some tests.
This commit is contained in:
-12
@@ -17231,12 +17231,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("functionExpressionWithThisReferenceNI.kt")
|
||||
public void testFunctionExpressionWithThisReferenceNI() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReferenceNI.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("functionLiteralExpression.kt")
|
||||
public void testFunctionLiteralExpression() throws Exception {
|
||||
@@ -23582,12 +23576,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericSamProjectedOutWithNewInference.kt")
|
||||
public void testGenericSamProjectedOutWithNewInference() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOutWithNewInference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericSamSmartcast.kt")
|
||||
public void testGenericSamSmartcast() throws Exception {
|
||||
|
||||
Generated
+21
-55
@@ -2177,12 +2177,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
runTest("compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("samConversionInGenericConstructorCall_NI.kt")
|
||||
public void testSamConversionInGenericConstructorCall_NI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("samConversionToGeneric.kt")
|
||||
public void testSamConversionToGeneric() throws Exception {
|
||||
@@ -2544,6 +2538,12 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
runTest("compiler/testData/ir/irText/regressions/kt45236.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("newInferenceFixationOrder1.kt")
|
||||
public void testNewInferenceFixationOrder1() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/regressions/newInferenceFixationOrder1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAliasCtorForGenericClass.kt")
|
||||
public void testTypeAliasCtorForGenericClass() throws Exception {
|
||||
@@ -2555,22 +2555,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
public void testTypeParametersInImplicitCast() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/regressions/typeParametersInImplicitCast.kt");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/ir/irText/regressions/newInference")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class NewInference {
|
||||
@Test
|
||||
public void testAllFilesPresentInNewInference() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("fixationOrder1.kt")
|
||||
public void testFixationOrder1() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/regressions/newInference/fixationOrder1.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -2789,39 +2773,21 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionType1_NI.kt")
|
||||
public void testIntersectionType1_NI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType1_NI.kt");
|
||||
@TestMetadata("intersectionType1.kt")
|
||||
public void testIntersectionType1() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionType1_OI.kt")
|
||||
public void testIntersectionType1_OI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType1_OI.kt");
|
||||
@TestMetadata("intersectionType2.kt")
|
||||
public void testIntersectionType2() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionType2_NI.kt")
|
||||
public void testIntersectionType2_NI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType2_NI.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionType2_OI.kt")
|
||||
public void testIntersectionType2_OI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType2_OI.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionType3_NI.kt")
|
||||
public void testIntersectionType3_NI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType3_NI.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("intersectionType3_OI.kt")
|
||||
public void testIntersectionType3_OI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType3_OI.kt");
|
||||
@TestMetadata("intersectionType3.kt")
|
||||
public void testIntersectionType3() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/intersectionType3.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -2843,9 +2809,9 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localVariableOfIntersectionType_NI.kt")
|
||||
public void testLocalVariableOfIntersectionType_NI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/localVariableOfIntersectionType_NI.kt");
|
||||
@TestMetadata("localVariableOfIntersectionType.kt")
|
||||
public void testLocalVariableOfIntersectionType() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/localVariableOfIntersectionType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -2879,9 +2845,9 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("starProjection_OI.kt")
|
||||
public void testStarProjection_OI() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/starProjection_OI.kt");
|
||||
@TestMetadata("starProjection.kt")
|
||||
public void testStarProjection() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/types/starProjection.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Vendored
-2
@@ -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
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun foo(vararg a: String, result: String = "OK"): String =
|
||||
if (a.size == 0) result else "Fail"
|
||||
|
||||
|
||||
Vendored
-2
@@ -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)
|
||||
|
||||
-2
@@ -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
@@ -1,6 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: STDLIB_TEXT
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline fun foo(mkString: () -> String): String =
|
||||
|
||||
+1
-2
@@ -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) }
|
||||
|
||||
Vendored
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun foo(vararg l: Long, s: String = "OK"): String =
|
||||
if (l.size == 0) s else "Fail"
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline fun foo(x: (Int, Int) -> Int): Int =
|
||||
|
||||
Vendored
-3
@@ -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]
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
fun foo(
|
||||
f: (
|
||||
Int, Int, Int, Int, Int, Int, Int, Int, Int, Int,
|
||||
|
||||
Vendored
+1
-3
@@ -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
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
-2
@@ -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)
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
fun foo(x: String, vararg y: String): String =
|
||||
if (y.size == 0) x + "K" else "Fail"
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
Vendored
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
fun sum(vararg args: Int): Int {
|
||||
var result = 0
|
||||
for (arg in args)
|
||||
|
||||
Vendored
-2
@@ -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"
|
||||
|
||||
|
||||
Vendored
+1
-4
@@ -1,6 +1,3 @@
|
||||
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
interface JsonParser
|
||||
interface JsonCodingParser : JsonParser
|
||||
|
||||
@@ -23,4 +20,4 @@ class Test {
|
||||
fun box(): String {
|
||||
Test().fooTest()
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_REFLECT
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
fun foo(s: String): Boolean {
|
||||
if (s != "kotlin") throw AssertionError(s)
|
||||
return true
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// ISSUE: KT-32462
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
object A {
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
// MODULE: lib
|
||||
// FILE: A.kt
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
val stack = mutableListOf<Int>()
|
||||
|
||||
@@ -22,4 +21,4 @@ fun box(): String {
|
||||
} else {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
@@ -33,4 +32,4 @@ fun box(): String {
|
||||
m.debounce(42)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:OptIn(ExperimentalTypeInference::class)
|
||||
@@ -31,4 +30,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return if (r == 42) "OK" else "Fail: $r"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// FULL_JDK
|
||||
// ISSUE: KT-35967
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
inline fun String.app(f: (String) -> String) = f(this)
|
||||
|
||||
fun fff(s: String, n: Int = 42) = s
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// ISSUE: KT-35707
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
@@ -17,4 +16,4 @@ fun box(): String {
|
||||
} else {
|
||||
"FAIL"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: -NewInference
|
||||
|
||||
inline operator fun Double.provideDelegate(thisRef: Any?, kProp: Any?) = this.toLong()
|
||||
|
||||
inline operator fun Long.getValue(thisRef: Any?, kProp: Any?) = this.toInt()
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.properties.ReadOnlyProperty
|
||||
@@ -26,4 +25,4 @@ fun box(): String {
|
||||
if (byStringNullable != "strNullable") return "fail5"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun test(foo: MutableList<String>?): List<String> {
|
||||
@@ -14,4 +13,4 @@ fun box(): String {
|
||||
if (b.size != 1) return "Fail 2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// TARGET_BACKEND: JVM
|
||||
// SKIP_JDK6
|
||||
// FULL_JDK
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
fun interface Foo {
|
||||
fun invoke(): String
|
||||
}
|
||||
@@ -8,4 +6,4 @@ fun foo(f: Foo) = f.invoke()
|
||||
|
||||
fun box(): String {
|
||||
return foo { "OK" }
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
// FILE: lib.kt
|
||||
|
||||
fun interface Foo {
|
||||
@@ -26,4 +24,4 @@ inline fun bar2(): String {
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun box(): String = bar1() + bar2()
|
||||
fun box(): String = bar1() + bar2()
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
|
||||
fun interface KRunnable {
|
||||
fun invoke()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument
|
||||
|
||||
fun interface MyRunnable {
|
||||
fun run()
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
fun interface Base {
|
||||
fun doStuff(): String
|
||||
}
|
||||
@@ -26,4 +24,4 @@ fun box(): String {
|
||||
if (runProxy { 10 } != "10") return "fail2"
|
||||
|
||||
return runBase { "OK" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface MyRunnable {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
// MODULE: m1
|
||||
// FILE: m1.kt
|
||||
|
||||
@@ -42,4 +40,4 @@ fun box(): String {
|
||||
if (rn2Inline { "inline" } != "inline") return "fail 4"
|
||||
|
||||
return rn2 { "OK" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface KRunnable {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface Fn<T, R> {
|
||||
@@ -38,4 +37,4 @@ fun box(): String {
|
||||
if (x != "LFoo42239 Bar1LFoo Foo42239 LBar1Foo") return x
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
// This test should check argument coercion between the SAM and the lambda.
|
||||
// For now it checks that Char is boxed in JS
|
||||
|
||||
@@ -40,4 +38,4 @@ fun box(): String {
|
||||
if (c6 !is Char || c6 != '6') return "fail6"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface KRunnable {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// WITH_COROUTINES
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
Vendored
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
fun Int.thisRef1() = fun () = this
|
||||
fun Int.thisRef2() = fun (): Int {return this}
|
||||
|
||||
@@ -31,4 +30,4 @@ fun box(): String {
|
||||
if ("bar".withLabel2() != "bar") return "Test 10 failed"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-36
@@ -1,36 +0,0 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// NewInference needed because of KT-26531
|
||||
|
||||
fun Int.thisRef1() = fun () = this
|
||||
fun Int.thisRef2() = fun (): Int {return this}
|
||||
|
||||
fun <T> T.genericThisRef1() = fun () = this
|
||||
fun <T> T.genericThisRef2() = fun (): T {return this}
|
||||
|
||||
val Int.valThisRef1: () -> Int get() = fun () = this
|
||||
val Int.valThisRef2: () -> Int get() = fun (): Int {return this}
|
||||
|
||||
val <T> T.valGenericThisRef1: ()->T get() = fun () = this
|
||||
val <T> T.valGenericThisRef2: ()->T get() = fun (): T {return this}
|
||||
|
||||
val <T> T.withLabel1: ()->T get() = fun () = this@withLabel1
|
||||
val <T> T.withLabel2: ()->T get() = fun (): T {return this@withLabel2}
|
||||
|
||||
fun box(): String {
|
||||
if (1.thisRef1()() != 1) return "Test 1 failed"
|
||||
if (2.thisRef2()() != 2) return "Test 2 failed"
|
||||
|
||||
if (3.genericThisRef1()() != 3) return "Test 3 failed"
|
||||
if (4.genericThisRef2()() != 4) return "Test 4 failed"
|
||||
|
||||
if (5.valThisRef1() != 5) return "Test 5 failed"
|
||||
if (6.valThisRef2() != 6) return "Test 6 failed"
|
||||
|
||||
if (7.valGenericThisRef1() != 7) return "Test 7 failed"
|
||||
if (8.valGenericThisRef2() != 8) return "Test 8 failed"
|
||||
|
||||
if ("bar".withLabel1() != "bar") return "Test 9 failed"
|
||||
if ("bar".withLabel2() != "bar") return "Test 10 failed"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +ProperIeee754Comparisons +NewInference
|
||||
// !LANGUAGE: +ProperIeee754Comparisons
|
||||
|
||||
fun box(): String {
|
||||
if (-0.0 < 0.0) return "Fail 1"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// !LANGUAGE: +NewInference
|
||||
// ISSUE: KT-33545
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
@@ -29,4 +28,4 @@ fun <Value> Flow<Value>.asLiveData() = liveData {
|
||||
// collect { emit(it) }
|
||||
}
|
||||
|
||||
fun box(): String = "OK"
|
||||
fun box(): String = "OK"
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// Issue: KT-36371
|
||||
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: WASM
|
||||
@@ -24,4 +23,4 @@ interface Flow<out T>
|
||||
|
||||
interface FlowCollector<in T>
|
||||
|
||||
fun box() = "OK"
|
||||
fun box() = "OK"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Issues: KT-33542, KT-33544
|
||||
// WITH_RUNTIME
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
import kotlin.experimental.ExperimentalTypeInference
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
interface A<T> {
|
||||
@@ -11,4 +10,4 @@ fun test(a: A<*>) {
|
||||
|
||||
fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// SKIP_DCE_DRIVEN
|
||||
|
||||
@@ -15,4 +14,4 @@ fun box(): String {
|
||||
val sorted = foo.test(list)
|
||||
|
||||
return list.first()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// !LANGUAGE: +NewInference
|
||||
// ISSUE: KT-32429
|
||||
|
||||
import kotlin.properties.Delegates.observable
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !OPT_IN: kotlin.RequiresOptIn
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// WITH_REFLECT
|
||||
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline fun <T> foo(f: () -> T): String {
|
||||
@@ -27,4 +26,4 @@ fun test(b: Boolean): String {
|
||||
|
||||
fun box(): String {
|
||||
return test(true)
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
class ExtensionReceiver
|
||||
typealias SuspendExtensionFunction = suspend ExtensionReceiver.() -> Unit
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// !LANGUAGE: -NewInference
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: example/Hello.java
|
||||
|
||||
package example;
|
||||
|
||||
@FunctionalInterface
|
||||
@@ -17,27 +16,28 @@ public class SomeJavaClass<A> {
|
||||
((Hello)hello).invoke("OK");
|
||||
}
|
||||
|
||||
public void plus(Hello<A> hello) {
|
||||
public SomeJavaClass<A> plus(Hello<A> hello) {
|
||||
((Hello)hello).invoke("OK");
|
||||
return this;
|
||||
}
|
||||
|
||||
public void get(Hello<A> hello) {
|
||||
((Hello)hello).invoke("OK");
|
||||
}
|
||||
|
||||
public void set(int i, Hello<A> hello) {
|
||||
((Hello)hello).invoke("OK");
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import example.SomeJavaClass
|
||||
|
||||
fun box(): String {
|
||||
val a: SomeJavaClass<out String> = SomeJavaClass()
|
||||
var a: SomeJavaClass<out String> = SomeJavaClass()
|
||||
|
||||
var result = "fail"
|
||||
|
||||
// a::someFunction parameter has type of Nothing
|
||||
// while it's completely safe to pass a lambda for a SAM
|
||||
// since Hello is effectively contravariant by its parameter
|
||||
// NB: this ^ is not supported by FIR yet
|
||||
a.someFunction {
|
||||
result = it
|
||||
}
|
||||
@@ -58,5 +58,19 @@ fun box(): String {
|
||||
|
||||
if (result != "OK") return "fail 3: $result"
|
||||
|
||||
result = "fail"
|
||||
|
||||
a += {
|
||||
result = it
|
||||
}
|
||||
|
||||
if (result != "OK") return "fail 4: $result"
|
||||
|
||||
result = "fail"
|
||||
|
||||
a[0] = { result = it }
|
||||
|
||||
if (result != "OK") return "fail 5: $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
-76
@@ -1,76 +0,0 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: example/Hello.java
|
||||
|
||||
package example;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface Hello<A> {
|
||||
void invoke(A a);
|
||||
}
|
||||
|
||||
// FILE: example/SomeJavaClass.java
|
||||
package example;
|
||||
|
||||
public class SomeJavaClass<A> {
|
||||
public void someFunction(Hello<A> hello) {
|
||||
((Hello)hello).invoke("OK");
|
||||
}
|
||||
|
||||
public SomeJavaClass<A> plus(Hello<A> hello) {
|
||||
((Hello)hello).invoke("OK");
|
||||
return this;
|
||||
}
|
||||
|
||||
public void get(Hello<A> hello) {
|
||||
((Hello)hello).invoke("OK");
|
||||
}
|
||||
|
||||
public void set(int i, Hello<A> hello) {
|
||||
((Hello)hello).invoke("OK");
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import example.SomeJavaClass
|
||||
|
||||
fun box(): String {
|
||||
var a: SomeJavaClass<out String> = SomeJavaClass()
|
||||
|
||||
var result = "fail"
|
||||
|
||||
a.someFunction {
|
||||
result = it
|
||||
}
|
||||
|
||||
if (result != "OK") return "fail 1: $result"
|
||||
result = "fail"
|
||||
|
||||
a + {
|
||||
result = it
|
||||
}
|
||||
|
||||
if (result != "OK") return "fail 2: $result"
|
||||
result = "fail"
|
||||
|
||||
a[{
|
||||
result = it
|
||||
}]
|
||||
|
||||
if (result != "OK") return "fail 3: $result"
|
||||
|
||||
result = "fail"
|
||||
|
||||
a += {
|
||||
result = it
|
||||
}
|
||||
|
||||
if (result != "OK") return "fail 4: $result"
|
||||
|
||||
result = "fail"
|
||||
|
||||
a[0] = { result = it }
|
||||
|
||||
if (result != "OK") return "fail 5: $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: javaNestedSamInterface.kt
|
||||
import test.A
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +MixedNamedArgumentsInTheirOwnPosition
|
||||
|
||||
fun foo(
|
||||
p1: Int = 1,
|
||||
p2: String = "2",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +NewInference +MixedNamedArgumentsInTheirOwnPosition
|
||||
// !LANGUAGE: +MixedNamedArgumentsInTheirOwnPosition
|
||||
|
||||
fun foo(
|
||||
p1: Int,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +NewInference +MixedNamedArgumentsInTheirOwnPosition
|
||||
// !LANGUAGE: +MixedNamedArgumentsInTheirOwnPosition
|
||||
|
||||
fun foo1(
|
||||
vararg p1: Int,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +NewInference +MixedNamedArgumentsInTheirOwnPosition
|
||||
// !LANGUAGE: +MixedNamedArgumentsInTheirOwnPosition
|
||||
// See KT-17691: Wrong argument order in resolved call with varargs. (fixed in JVM_IR)
|
||||
|
||||
var log = ""
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
// FILE: messages/foo.kt
|
||||
|
||||
package messages
|
||||
@@ -20,4 +18,4 @@ class Test {
|
||||
fun box(): String {
|
||||
val result = Test().test()
|
||||
return if (result) "faile" else "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, NATIVE
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
// FILE: Foo.java
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Holder(val list: List<String>?)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Inv<T>
|
||||
|
||||
+1
-3
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
class Recursive<T : Recursive<T>> : Generic<PlaceHolder<T>>, MainSupertype
|
||||
open class Simple<T> : Generic<T>, MainSupertype
|
||||
|
||||
@@ -23,4 +21,4 @@ fun <T> select(x: T?, y: T): T = y
|
||||
fun box(): String {
|
||||
takeElement(null, Simple())
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument -ProhibitVarargAsArrayAfterSamArgument
|
||||
// !LANGUAGE: -ProhibitVarargAsArrayAfterSamArgument
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +SamConversionPerArgument
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: Fn.java
|
||||
@@ -41,4 +40,4 @@ fun box(): String {
|
||||
if (x != "LFoo42239 Bar1LFoo Foo42239 LBar1Foo") return x
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// FILE: Fn.java
|
||||
@@ -38,4 +37,4 @@ fun box(): String {
|
||||
if (x != "LFoo42239 Bar1LFoo Foo42239 LBar1Foo") return x
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +SamConversionPerArgument +SamConversionForKotlinFunctions +FunctionalInterfaceConversion
|
||||
// WITH_REFLECT
|
||||
// FULL_JDK
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// IR_DUMP
|
||||
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: STDLIB_TEXT
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
// IGNORE_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
Vendored
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// (old inference fails in the frontend)
|
||||
// FILE: JFieldOwner.java
|
||||
|
||||
public class JFieldOwner {
|
||||
|
||||
+1
-3
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun use(f: C.(Int) -> Unit) {}
|
||||
|
||||
class C
|
||||
@@ -20,4 +18,4 @@ fun testExtensionDefault() {
|
||||
|
||||
fun testExtensionBoth() {
|
||||
use(C::extensionBoth)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
fun interface IFoo {
|
||||
fun foo(i: Int)
|
||||
@@ -45,4 +44,4 @@ fun test6(a: Any) {
|
||||
a as (Int) -> Unit
|
||||
a as IFoo
|
||||
A[a] += 1
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-3
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun use(fn: (Int) -> Any) = fn(42)
|
||||
|
||||
class C(vararg xs: Int)
|
||||
@@ -12,4 +10,4 @@ fun testConstructor() = use(::C)
|
||||
|
||||
fun testInnerClassConstructor(outer: Outer) = use(outer::Inner)
|
||||
|
||||
fun testInnerClassConstructorCapturingOuter() = use(Outer()::Inner)
|
||||
fun testInnerClassConstructorCapturingOuter() = use(Outer()::Inner)
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun use1(fn: (A, Int) -> Unit) {}
|
||||
|
||||
fun use2(fn: (Int) -> Unit) {}
|
||||
|
||||
-3
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
fun interface IFoo {
|
||||
fun foo(i: Int)
|
||||
}
|
||||
@@ -11,4 +9,3 @@ fun withVararg(vararg xs: Int) = 42
|
||||
fun test() {
|
||||
useFoo(::withVararg)
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
import Host.importedObjectMemberWithVarargs
|
||||
|
||||
fun use(fn: (Int) -> String) = fn(1)
|
||||
@@ -27,4 +26,4 @@ fun testImportedObjectMember() = use(::importedObjectMemberWithVarargs)
|
||||
|
||||
fun testDefault0() = use0(::fnWithDefaults)
|
||||
|
||||
fun testVararg0() = use0(::fnWithVarargs)
|
||||
fun testVararg0() = use0(::fnWithVarargs)
|
||||
|
||||
Vendored
+1
-3
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun use(fn: (Int) -> Unit) { fn(1) }
|
||||
|
||||
class Host {
|
||||
@@ -26,4 +24,4 @@ class Host {
|
||||
fun testBoundReceiverExpression() {
|
||||
use(Host()::withVararg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// !LANGUAGE: +NewInference, +FunctionReferenceWithDefaultValueAsOtherType
|
||||
|
||||
fun sum(vararg args: Int): Int {
|
||||
var result = 0
|
||||
for (arg in args)
|
||||
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
fun interface IRunnable {
|
||||
fun run()
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
fun interface Foo {
|
||||
fun invoke(): String
|
||||
@@ -7,4 +6,4 @@ fun interface Foo {
|
||||
|
||||
fun foo(f: Foo) = f.invoke()
|
||||
|
||||
fun test() = foo { "OK" }
|
||||
fun test() = foo { "OK" }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
fun interface KRunnable {
|
||||
fun invoke()
|
||||
@@ -9,4 +8,3 @@ fun test(a: Any?) {
|
||||
a as () -> Unit
|
||||
KRunnable(a).invoke()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface Fn<T, R> {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user