JVM_IR. Do not mangle callable reference constructor call

#KT-44703 Fixed
This commit is contained in:
Ilmir Usmanov
2021-02-08 22:49:45 +01:00
parent 10cc86c975
commit 275fef94fe
10 changed files with 59 additions and 1 deletions
@@ -16960,6 +16960,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@Test
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@Test
@TestMetadata("constructorImplVisibility.kt")
public void testConstructorImplVisibility() throws Exception {
@@ -59,7 +59,8 @@ class MemoizedInlineClassReplacements(
it.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA ||
(it.origin == IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR && it.visibility == DescriptorVisibilities.LOCAL) ||
it.isStaticInlineClassReplacement ||
it.origin.isSynthetic ->
it.origin.isSynthetic ||
it.origin == IrDeclarationOrigin.ADAPTER_FOR_CALLABLE_REFERENCE ->
null
it.isInlineClassFieldGetter ->
@@ -0,0 +1,14 @@
// WITH_RUNTIME
// KJS_FULL_RUNTIME
interface I {
companion object {
val default: IC by lazy(::IC)
}
}
inline class IC(val ok: String = "OK") : I
fun box(): String {
return I.default.ok
}
@@ -16960,6 +16960,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@Test
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@Test
@TestMetadata("constructorImplVisibility.kt")
public void testConstructorImplVisibility() throws Exception {
@@ -16960,6 +16960,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@Test
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@Test
@TestMetadata("constructorImplVisibility.kt")
public void testConstructorImplVisibility() throws Exception {
@@ -14134,6 +14134,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@TestMetadata("constructorImplVisibility.kt")
public void testConstructorImplVisibility() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorImplVisibility.kt");
@@ -12389,6 +12389,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@TestMetadata("correctBoxingForBranchExpressions.kt")
public void testCorrectBoxingForBranchExpressions() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt");
@@ -11874,6 +11874,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@TestMetadata("correctBoxingForBranchExpressions.kt")
public void testCorrectBoxingForBranchExpressions() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt");
@@ -11939,6 +11939,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@TestMetadata("correctBoxingForBranchExpressions.kt")
public void testCorrectBoxingForBranchExpressions() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt");
@@ -6370,6 +6370,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt");
}
@TestMetadata("constructorCallableReference.kt")
public void testConstructorCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt");
}
@TestMetadata("correctBoxingForBranchExpressions.kt")
public void testCorrectBoxingForBranchExpressions() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt");