[FIR] Always expand a type before checking it in FirConstChecks
The issue appeared when we analyzed some typealias. 1. The typealias itself could be valid, but it could point to an invalid type. 2. The typealias could point, for example, to an unsigned type that must be handled in a special way #KT-59894
This commit is contained in:
+12
@@ -6901,6 +6901,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/topLevelVar.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAliasToUnsigned.kt")
|
||||
public void testTypeAliasToUnsigned() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/typeAliasToUnsigned.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unaryMinusIndepWoExpType.kt")
|
||||
public void testUnaryMinusIndepWoExpType() throws Exception {
|
||||
@@ -6913,6 +6919,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unaryMinusIndependentExpType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReference.kt")
|
||||
public void testUnresolvedReference() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unresolvedReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unsignedOperations.kt")
|
||||
public void testUnsignedOperations() throws Exception {
|
||||
|
||||
+12
@@ -6901,6 +6901,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/topLevelVar.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAliasToUnsigned.kt")
|
||||
public void testTypeAliasToUnsigned() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/typeAliasToUnsigned.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unaryMinusIndepWoExpType.kt")
|
||||
public void testUnaryMinusIndepWoExpType() throws Exception {
|
||||
@@ -6913,6 +6919,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unaryMinusIndependentExpType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedReference.kt")
|
||||
public void testUnresolvedReference() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/constantEvaluator/constant/unresolvedReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unsignedOperations.kt")
|
||||
public void testUnsignedOperations() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user