[JVM IR] Copy attributes for JVM_STATIC_WRAPPERS.
This commit is contained in:
committed by
Alexander Udalov
parent
3db5ba98ad
commit
d397efb2bd
+6
@@ -9084,6 +9084,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmStaticAndJvmInline.kt")
|
||||
public void testJvmStaticAndJvmInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/jvmStaticAndJvmInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12958.kt")
|
||||
public void testKt12958() throws Exception {
|
||||
|
||||
@@ -196,6 +196,7 @@ class JvmCachedDeclarations(
|
||||
isSuspend = target.isSuspend
|
||||
}.apply proxy@{
|
||||
parent = this@makeProxy
|
||||
copyAttributes(target)
|
||||
copyTypeParametersFrom(target)
|
||||
copyAnnotationsFrom(target)
|
||||
if (!isStatic) {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
suspend fun <T> suspendHere(x: T): T = suspendCoroutineUninterceptedOrReturn {
|
||||
it.resume(x)
|
||||
COROUTINE_SUSPENDED
|
||||
}
|
||||
|
||||
inline class I(val x: Any?)
|
||||
|
||||
open class C {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
protected suspend fun f(): I = I(suspendHere("OK"))
|
||||
}
|
||||
}
|
||||
|
||||
class D : C() {
|
||||
companion object {
|
||||
suspend fun g() = f()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result = "FAIL"
|
||||
builder {
|
||||
result = D.g().x as String
|
||||
}
|
||||
return result
|
||||
}
|
||||
+6
@@ -9084,6 +9084,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmStaticAndJvmInline.kt")
|
||||
public void testJvmStaticAndJvmInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/jvmStaticAndJvmInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12958.kt")
|
||||
public void testKt12958() throws Exception {
|
||||
|
||||
+6
@@ -9084,6 +9084,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmStaticAndJvmInline.kt")
|
||||
public void testJvmStaticAndJvmInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/jvmStaticAndJvmInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt12958.kt")
|
||||
public void testKt12958() throws Exception {
|
||||
|
||||
+5
@@ -7104,6 +7104,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmStaticAndJvmInline.kt")
|
||||
public void testJvmStaticAndJvmInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/jvmStaticAndJvmInline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt12958.kt")
|
||||
public void testKt12958() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/kt12958.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
-5
@@ -15960,11 +15960,6 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
-5
@@ -15371,11 +15371,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
-5
@@ -15436,11 +15436,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
-5
@@ -9181,11 +9181,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("kt46568.kt")
|
||||
public void testKt46568() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/jvmStatic/kt46568.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/jvmStatic/protectedInSuperClass")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user