JVM_IR KT-47510 indy callee parent is a package fragment, not a class
This commit is contained in:
committed by
TeamCityServer
parent
a54e758189
commit
68c3f30aa7
+6
@@ -21431,6 +21431,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt47510.kt")
|
||||||
|
public void testKt47510() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt47510.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nullabilityAssertions.kt")
|
@TestMetadata("nullabilityAssertions.kt")
|
||||||
public void testNullabilityAssertions() throws Exception {
|
public void testNullabilityAssertions() throws Exception {
|
||||||
|
|||||||
+8
-3
@@ -670,9 +670,14 @@ class ExpressionCodegen(
|
|||||||
// Otherwise, we need to treat `Result` as boxed if it overrides a non-`Result` or boxed `Result` type.
|
// Otherwise, we need to treat `Result` as boxed if it overrides a non-`Result` or boxed `Result` type.
|
||||||
// TODO: if results of `needsResultArgumentUnboxing` for `overriddenSymbols` are inconsistent, the boxedness
|
// TODO: if results of `needsResultArgumentUnboxing` for `overriddenSymbols` are inconsistent, the boxedness
|
||||||
// of the `Result` depends on which overridden function is called. This is probably unfixable.
|
// of the `Result` depends on which overridden function is called. This is probably unfixable.
|
||||||
return parentAsClass.functions.none {
|
val parent = this.parent
|
||||||
it != this && it.origin == IrDeclarationOrigin.BRIDGE && it.attributeOwnerId == attributeOwnerId
|
return parent is IrClass &&
|
||||||
} && overriddenSymbols.any { it.owner.resultIsActuallyAny(index) != false }
|
parent.functions.none {
|
||||||
|
it != this && it.origin == IrDeclarationOrigin.BRIDGE && it.attributeOwnerId == attributeOwnerId
|
||||||
|
} &&
|
||||||
|
overriddenSymbols.any {
|
||||||
|
it.owner.resultIsActuallyAny(index) != false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitFieldAccess(expression: IrFieldAccessExpression, data: BlockInfo): PromisedValue {
|
override fun visitFieldAccess(expression: IrFieldAccessExpression, data: BlockInfo): PromisedValue {
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
// TARGET_BACKEND: JVM
|
||||||
|
// WITH_RUNTIME
|
||||||
|
// FULL_JDK
|
||||||
|
|
||||||
|
import java.util.concurrent.Executor
|
||||||
|
import kotlin.coroutines.Continuation
|
||||||
|
import kotlin.coroutines.CoroutineContext
|
||||||
|
|
||||||
|
class Wrapper<T>(val pool: Executor, private val cont: Continuation<T>) : Continuation<T> {
|
||||||
|
override val context: CoroutineContext
|
||||||
|
get() = cont.context
|
||||||
|
|
||||||
|
override fun resumeWith(result: Result<T>) {
|
||||||
|
// Check that there's no compiler exception here
|
||||||
|
pool.execute { cont.resumeWith(result) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() = "OK"
|
||||||
+6
@@ -21389,6 +21389,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt47510.kt")
|
||||||
|
public void testKt47510() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt47510.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nullabilityAssertions.kt")
|
@TestMetadata("nullabilityAssertions.kt")
|
||||||
public void testNullabilityAssertions() throws Exception {
|
public void testNullabilityAssertions() throws Exception {
|
||||||
|
|||||||
+6
@@ -21431,6 +21431,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt47510.kt")
|
||||||
|
public void testKt47510() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt47510.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nullabilityAssertions.kt")
|
@TestMetadata("nullabilityAssertions.kt")
|
||||||
public void testNullabilityAssertions() throws Exception {
|
public void testNullabilityAssertions() throws Exception {
|
||||||
|
|||||||
+5
@@ -17874,6 +17874,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt45779.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt47510.kt")
|
||||||
|
public void testKt47510() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/kt47510.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("nullabilityAssertions.kt")
|
@TestMetadata("nullabilityAssertions.kt")
|
||||||
public void testNullabilityAssertions() throws Exception {
|
public void testNullabilityAssertions() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/invokedynamic/sam/nullabilityAssertions.kt");
|
runTest("compiler/testData/codegen/box/invokedynamic/sam/nullabilityAssertions.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user