[FIR] Forbid to use equality and unsigned comparison in const expression

#KT-62683
This commit is contained in:
Ivan Kylchik
2023-10-27 18:47:33 +02:00
committed by Space Team
parent 8715bd6189
commit fd4a3a0b88
10 changed files with 191 additions and 7 deletions
@@ -6453,6 +6453,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/floatsAndDoubles.kt");
}
@Test
@TestMetadata("identityCompare.kt")
public void testIdentityCompare() throws Exception {
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/identityCompare.kt");
}
@Test
@TestMetadata("integer.kt")
public void testInteger() throws Exception {
@@ -6530,6 +6536,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
public void testUnaryMinusIndependentExpType() throws Exception {
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unaryMinusIndependentExpType.kt");
}
@Test
@TestMetadata("unsignedOperations.kt")
public void testUnsignedOperations() throws Exception {
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unsignedOperations.kt");
}
}
@Nested
@@ -6453,6 +6453,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/floatsAndDoubles.kt");
}
@Test
@TestMetadata("identityCompare.kt")
public void testIdentityCompare() throws Exception {
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/identityCompare.kt");
}
@Test
@TestMetadata("integer.kt")
public void testInteger() throws Exception {
@@ -6530,6 +6536,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
public void testUnaryMinusIndependentExpType() throws Exception {
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unaryMinusIndependentExpType.kt");
}
@Test
@TestMetadata("unsignedOperations.kt")
public void testUnsignedOperations() throws Exception {
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unsignedOperations.kt");
}
}
@Nested