jvm-abi-gen: Add tests for KT-40133 and KT-40340
This commit is contained in:
committed by
Alexander Udalov
parent
5059513106
commit
6756420725
Generated
+10
@@ -70,6 +70,16 @@ public class CompileAgainstJvmAbiTestGenerated extends AbstractCompileAgainstJvm
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/");
|
||||
}
|
||||
|
||||
@TestMetadata("kt-40133")
|
||||
public void testKt_40133() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/kt-40133/");
|
||||
}
|
||||
|
||||
@TestMetadata("kt-40340")
|
||||
public void testKt_40340() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/kt-40340/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateOnlyConstructors")
|
||||
public void testPrivateOnlyConstructors() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/privateOnlyConstructors/");
|
||||
|
||||
Generated
+10
@@ -70,6 +70,16 @@ public class IrCompileAgainstJvmAbiTestGenerated extends AbstractIrCompileAgains
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/");
|
||||
}
|
||||
|
||||
@TestMetadata("kt-40133")
|
||||
public void testKt_40133() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/kt-40133/");
|
||||
}
|
||||
|
||||
@TestMetadata("kt-40340")
|
||||
public void testKt_40340() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/kt-40340/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateOnlyConstructors")
|
||||
public void testPrivateOnlyConstructors() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/privateOnlyConstructors/");
|
||||
|
||||
Generated
+10
@@ -70,6 +70,16 @@ public class LegacyCompileAgainstJvmAbiTestGenerated extends AbstractLegacyCompi
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/");
|
||||
}
|
||||
|
||||
@TestMetadata("kt-40133")
|
||||
public void testKt_40133() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/kt-40133/");
|
||||
}
|
||||
|
||||
@TestMetadata("kt-40340")
|
||||
public void testKt_40340() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/kt-40340/");
|
||||
}
|
||||
|
||||
@TestMetadata("privateOnlyConstructors")
|
||||
public void testPrivateOnlyConstructors() throws Exception {
|
||||
runTest("plugins/jvm-abi-gen/testData/compile/privateOnlyConstructors/");
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package app
|
||||
|
||||
import lib.*
|
||||
|
||||
fun runAppAndReturnOk(): String {
|
||||
var result = "Fail"
|
||||
anInlineFunction { result = "OK" }
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,11 @@
|
||||
package lib
|
||||
|
||||
inline fun anInlineFunction(crossinline crossInlineLamba: () -> Unit) {
|
||||
Foo().apply {
|
||||
barMethod { crossInlineLamba() }
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
fun barMethod(aLambda: () -> Unit) { aLambda() }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package app
|
||||
|
||||
import lib.*
|
||||
|
||||
fun runAppAndReturnOk(): String {
|
||||
return inlineFunctionTakingSam { "OK" }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// IGNORE_BACKEND_LEGACY: JVM
|
||||
@@ -0,0 +1,11 @@
|
||||
package lib;
|
||||
|
||||
import java.util.function.Supplier
|
||||
|
||||
fun withSupplier(s: Supplier<String>): String {
|
||||
return s.get()
|
||||
}
|
||||
|
||||
inline fun inlineFunctionTakingSam(noinline stringSupplierFunction: () -> String): String {
|
||||
return withSupplier(stringSupplierFunction)
|
||||
}
|
||||
Reference in New Issue
Block a user