Compare commits

...

2 Commits

Author SHA1 Message Date
Ilmir Usmanov
ccaa4a1cf1 Minor. Ignore test on WASM 2021-02-09 00:23:51 +01:00
Ilmir Usmanov
f025a357f7 JVM_IR. Do not mangle callable reference constructor call
#KT-44703 Fixed
2021-02-08 22:49:45 +01:00
10 changed files with 60 additions and 1 deletions

View File

@@ -16954,6 +16954,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 {

View File

@@ -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 ->

View File

@@ -0,0 +1,15 @@
// WITH_RUNTIME
// KJS_FULL_RUNTIME
// IGNORE_BACKEND: WASM
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
}

View File

@@ -16954,6 +16954,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 {

View File

@@ -16954,6 +16954,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 {

View File

@@ -14129,6 +14129,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");

View File

@@ -12384,6 +12384,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");

View File

@@ -11869,6 +11869,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");

View File

@@ -11934,6 +11934,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");

View File

@@ -6365,6 +6365,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");