[K2] Properly evaluate complex boolean constants

Some boolean expressions could be transformed into `IrWhen`
node. To understand that this node is actually
a boolean expression, we need to analyze its origin.

#KT-62683
This commit is contained in:
Ivan Kylchik
2023-11-14 12:49:18 +01:00
committed by Space Team
parent ede77ea29c
commit 3fa82c7bb1
19 changed files with 114 additions and 9 deletions
@@ -24806,6 +24806,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
@@ -25294,6 +25294,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
@@ -24318,6 +24318,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
@@ -24807,6 +24807,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {