Add the ANY_FIR target for muting Fir2IrText tests

This commit is contained in:
pyos
2019-12-19 12:25:21 +01:00
committed by Dmitry Petrov
parent a4b005fd5d
commit 2adcb5dec4
8 changed files with 98 additions and 85 deletions
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
@@ -21,11 +22,11 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class)
public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInIrText() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("compiler/testData/ir/irText/classes")
@@ -33,7 +34,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Classes extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
@TestMetadata("abstractMembers.kt")
@@ -42,7 +43,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
}
public void testAllFilesPresentInClasses() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("annotationClasses.kt")
@@ -135,6 +136,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/classes/initVal.kt");
}
@TestMetadata("initValInLambda.kt")
public void testInitValInLambda() throws Exception {
runTest("compiler/testData/ir/irText/classes/initValInLambda.kt");
}
@TestMetadata("initVar.kt")
public void testInitVar() throws Exception {
runTest("compiler/testData/ir/irText/classes/initVar.kt");
@@ -221,11 +227,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Declarations extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInDeclarations() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("catchParameterInTopLevelProperty.kt")
@@ -328,11 +334,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Annotations extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInAnnotations() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("annotationsInAnnotationArguments.kt")
@@ -491,11 +497,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Multiplatform extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInMultiplatform() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("expectClassInherited.kt")
@@ -519,11 +525,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Parameters extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInParameters() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("class.kt")
@@ -597,11 +603,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class ProvideDelegate extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInProvideDelegate() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("differentReceivers.kt")
@@ -641,11 +647,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Errors extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInErrors() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("suppressedNonPublicCall.kt")
@@ -664,11 +670,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Expressions extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInExpressions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("argumentMappedWithError.kt")
@@ -1326,11 +1332,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class FloatingPointComparisons extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInFloatingPointComparisons() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("comparableWithDoubleOrFloat.kt")
@@ -1394,11 +1400,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Sam extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInSam() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/sam"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("samByProjectedType.kt")
@@ -1448,11 +1454,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Lambdas extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInLambdas() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("anonymousFunction.kt")
@@ -1501,11 +1507,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Regressions extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInRegressions() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("coercionInLoop.kt")
@@ -1533,11 +1539,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class NewInference extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInNewInference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("fixationOrder1.kt")
@@ -1552,11 +1558,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Singletons extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInSingletons() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("companion.kt")
@@ -1580,11 +1586,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Stubs extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
public void testAllFilesPresentInStubs() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("builtinMap.kt")
@@ -1658,7 +1664,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
@RunWith(JUnit3RunnerWithInners.class)
public static class Types extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY_FIR, testDataFilePath);
}
@TestMetadata("abbreviatedTypes.kt")
@@ -1667,7 +1673,7 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
}
public void testAllFilesPresentInTypes() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types"), Pattern.compile("^(.+)\\.kt$"), null, true);
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.ANY_FIR, true);
}
@TestMetadata("asOnPlatformType.kt")
-9
View File
@@ -11,12 +11,3 @@ class TestInitValInInitBlock {
x = 0
}
}
class TestInitValInLambdaCalledOnce {
val x: Int
init {
1.run {
x = 0
}
}
}
-41
View File
@@ -93,44 +93,3 @@ FILE fqName:<root> fileName:/initVal.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:TestInitValInLambdaCalledOnce modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestInitValInLambdaCalledOnce
CONSTRUCTOR visibility:public <> () returnType:<root>.TestInitValInLambdaCalledOnce [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitValInLambdaCalledOnce modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.TestInitValInLambdaCalledOnce) returnType:kotlin.Int
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.TestInitValInLambdaCalledOnce
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.TestInitValInLambdaCalledOnce'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.TestInitValInLambdaCalledOnce declared in <root>.TestInitValInLambdaCalledOnce.<get-x>' type=<root>.TestInitValInLambdaCalledOnce origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun run <T, R> (block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.run, R of kotlin.run>): R of kotlin.run [inline] declared in kotlin' type=kotlin.Unit origin=null
<T>: kotlin.Int
<R>: kotlin.Unit
$receiver: CONST Int type=kotlin.Int value=1
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.TestInitValInLambdaCalledOnce declared in <root>.TestInitValInLambdaCalledOnce' type=<root>.TestInitValInLambdaCalledOnce origin=null
value: CONST Int type=kotlin.Int value=0
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -0,0 +1,9 @@
// IGNORE_BACKEND: ANY_FIR
class TestInitValInLambdaCalledOnce {
val x: Int
init {
1.run {
x = 0
}
}
}
+42
View File
@@ -0,0 +1,42 @@
FILE fqName:<root> fileName:/initValInLambda.kt
CLASS CLASS name:TestInitValInLambdaCalledOnce modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestInitValInLambdaCalledOnce
CONSTRUCTOR visibility:public <> () returnType:<root>.TestInitValInLambdaCalledOnce [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInitValInLambdaCalledOnce modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.TestInitValInLambdaCalledOnce) returnType:kotlin.Int
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.TestInitValInLambdaCalledOnce
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.TestInitValInLambdaCalledOnce'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.TestInitValInLambdaCalledOnce declared in <root>.TestInitValInLambdaCalledOnce.<get-x>' type=<root>.TestInitValInLambdaCalledOnce origin=null
ANONYMOUS_INITIALIZER isStatic=false
BLOCK_BODY
CALL 'public final fun run <T, R> (block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.run, R of kotlin.run>): R of kotlin.run [inline] declared in kotlin' type=kotlin.Unit origin=null
<T>: kotlin.Int
<R>: kotlin.Unit
$receiver: CONST Int type=kotlin.Int value=1
block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.TestInitValInLambdaCalledOnce declared in <root>.TestInitValInLambdaCalledOnce' type=<root>.TestInitValInLambdaCalledOnce origin=null
value: CONST Int type=kotlin.Int value=0
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
@@ -10,6 +10,7 @@ enum class TargetBackend(
private val compatibleWithTargetBackend: TargetBackend? = null
) {
ANY(false),
ANY_FIR(true, ANY),
JVM(false),
JVM_IR(true, JVM),
JS(false),
@@ -589,7 +589,7 @@ fun main(args: Array<String>) {
testGroup("compiler/fir/fir2ir/tests", "compiler/testData") {
testClass<AbstractFir2IrTextTest> {
model("ir/irText")
model("ir/irText", targetBackend = TargetBackend.ANY_FIR)
}
}
@@ -135,6 +135,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
runTest("compiler/testData/ir/irText/classes/initVal.kt");
}
@TestMetadata("initValInLambda.kt")
public void testInitValInLambda() throws Exception {
runTest("compiler/testData/ir/irText/classes/initValInLambda.kt");
}
@TestMetadata("initVar.kt")
public void testInitVar() throws Exception {
runTest("compiler/testData/ir/irText/classes/initVar.kt");