Set up tests for fun interfaces for JVM backend for now
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +FunctionalInterfaceConversion
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
fun interface Foo {
|
||||
fun invoke(): String
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
fun interface Foo {
|
||||
fun invoke(): String
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
fun interface KRunnable {
|
||||
fun invoke()
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface MyRunnable {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface KRunnable {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface Fn<T, R> {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun interface KRunnable {
|
||||
|
||||
+3
@@ -1,4 +1,7 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_COROUTINES
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
// FILE: A.kt
|
||||
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ fun foo(f: Foo) {}
|
||||
|
||||
fun test() {
|
||||
foo {}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,4 +12,4 @@ fun foo(f: KRunnable) {}
|
||||
fun test() {
|
||||
foo(KRunnable {})
|
||||
foo(KRunnableAlias {})
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,4 +22,4 @@ fun test(
|
||||
k.f_t(f_string) { it checkType { _<String>() } }
|
||||
k.f_r(f_int) { it checkType { _<Int>() } }
|
||||
k.f_pr(f_pr) { it checkType { _<PR<String, Int>>() } }
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -30,4 +30,4 @@ fun test(j: J, r: KRunnable) {
|
||||
j.foo3({}, r, {})
|
||||
j.foo3({}, {}, r)
|
||||
j.foo3({}, {}, {})
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,4 +11,4 @@ suspend fun bar() {}
|
||||
|
||||
fun test() {
|
||||
run(::bar)
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -348,6 +348,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useDeserializedFunInterface.kt")
|
||||
public void testUseDeserializedFunInterface() throws Exception {
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+5
@@ -343,6 +343,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("useDeserializedFunInterface.kt")
|
||||
public void testUseDeserializedFunInterface() throws Exception {
|
||||
runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user