JVM_IR: Support init blocks in inline classes
Put their content to constructor-impl, so they are called during constructor call, but they are not called during boxing, because box-impl calls <init> and not constructor-impl. #KT-28055 In progress
This commit is contained in:
Generated
+10
@@ -11502,6 +11502,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boxImplDoesNotExecuteInitBlock.kt")
|
||||
public void testBoxImplDoesNotExecuteInitBlock() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInitBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt")
|
||||
public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt");
|
||||
@@ -11772,6 +11777,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericVararg2ndConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initBlock.kt")
|
||||
public void testInitBlock() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/initBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassAsLastExpressionInInLambda.kt")
|
||||
public void testInlineClassAsLastExpressionInInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt");
|
||||
|
||||
Generated
+10
@@ -11502,6 +11502,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boxImplDoesNotExecuteInitBlock.kt")
|
||||
public void testBoxImplDoesNotExecuteInitBlock() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInitBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt")
|
||||
public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt");
|
||||
@@ -11772,6 +11777,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericVararg2ndConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initBlock.kt")
|
||||
public void testInitBlock() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/initBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassAsLastExpressionInInLambda.kt")
|
||||
public void testInlineClassAsLastExpressionInInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt");
|
||||
|
||||
+10
@@ -11567,6 +11567,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boxImplDoesNotExecuteInitBlock.kt")
|
||||
public void testBoxImplDoesNotExecuteInitBlock() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInitBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt")
|
||||
public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt");
|
||||
@@ -11837,6 +11842,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/genericVararg2ndConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initBlock.kt")
|
||||
public void testInitBlock() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/initBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassAsLastExpressionInInLambda.kt")
|
||||
public void testInlineClassAsLastExpressionInInLambda() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt");
|
||||
|
||||
Reference in New Issue
Block a user