JVM_IR: Minor. Add test
This commit is contained in:
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
fun <T> builder(value: T, c: suspend T.() -> Unit) {
|
||||
c.startCoroutine(value, EmptyContinuation)
|
||||
}
|
||||
|
||||
interface A<T> {
|
||||
val value: T
|
||||
var result: T
|
||||
|
||||
fun test(): T {
|
||||
builder(value) { result = this }
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
object : A<String> {
|
||||
override val value = "OK"
|
||||
override var result = "Fail"
|
||||
}.test()
|
||||
+5
@@ -7245,6 +7245,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceMethodWithBodyGeneric.kt")
|
||||
public void testInterfaceMethodWithBodyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBodyGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("safeCallOnTwoReceiversLong.kt")
|
||||
public void testSafeCallOnTwoReceiversLong_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
+5
@@ -7245,6 +7245,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceMethodWithBodyGeneric.kt")
|
||||
public void testInterfaceMethodWithBodyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBodyGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("safeCallOnTwoReceiversLong.kt")
|
||||
public void testSafeCallOnTwoReceiversLong_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
+5
@@ -6660,6 +6660,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceMethodWithBodyGeneric.kt")
|
||||
public void testInterfaceMethodWithBodyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBodyGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("safeCallOnTwoReceiversLong.kt")
|
||||
public void testSafeCallOnTwoReceiversLong_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt", "kotlin.coroutines");
|
||||
|
||||
+5
@@ -6660,6 +6660,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceMethodWithBodyGeneric.kt")
|
||||
public void testInterfaceMethodWithBodyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBodyGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("safeCallOnTwoReceiversLong.kt")
|
||||
public void testSafeCallOnTwoReceiversLong_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt", "kotlin.coroutines");
|
||||
|
||||
Generated
+5
@@ -5650,6 +5650,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceMethodWithBodyGeneric.kt")
|
||||
public void testInterfaceMethodWithBodyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBodyGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("safeCallOnTwoReceiversLong.kt")
|
||||
public void testSafeCallOnTwoReceiversLong_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt", "kotlin.coroutines");
|
||||
|
||||
+5
@@ -5650,6 +5650,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBody.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceMethodWithBodyGeneric.kt")
|
||||
public void testInterfaceMethodWithBodyGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/interfaceMethodWithBodyGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("safeCallOnTwoReceiversLong.kt")
|
||||
public void testSafeCallOnTwoReceiversLong_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt", "kotlin.coroutines");
|
||||
|
||||
Reference in New Issue
Block a user