Fix ClassCastException at FirUninitializedEnumChecker
This commit is contained in:
committed by
TeamCityServer
parent
0d072de737
commit
1c16f2f8c9
+6
@@ -5745,6 +5745,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/tryWithAssignmentUsedInCatch.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("UninitializedEnumCompanionVals.kt")
|
||||
public void testUninitializedEnumCompanionVals() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedEnumCompanionVals.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uninitializedInLocalDeclarations.kt")
|
||||
public void testUninitializedInLocalDeclarations() throws Exception {
|
||||
|
||||
+6
@@ -5745,6 +5745,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/tryWithAssignmentUsedInCatch.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("UninitializedEnumCompanionVals.kt")
|
||||
public void testUninitializedEnumCompanionVals() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedEnumCompanionVals.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("uninitializedInLocalDeclarations.kt")
|
||||
public void testUninitializedInLocalDeclarations() throws Exception {
|
||||
|
||||
+1
-1
@@ -996,7 +996,7 @@ object DIAGNOSTICS_LIST : DiagnosticList("FirErrors") {
|
||||
}
|
||||
|
||||
val CONTROL_FLOW by object : DiagnosticGroup("Control flow diagnostics") {
|
||||
val UNINITIALIZED_VARIABLE by error<KtSimpleNameExpression> {
|
||||
val UNINITIALIZED_VARIABLE by error<KtExpression> {
|
||||
parameter<FirPropertySymbol>("variable")
|
||||
}
|
||||
val UNINITIALIZED_PARAMETER by error<KtSimpleNameExpression> {
|
||||
|
||||
+1
-1
@@ -543,7 +543,7 @@ object FirErrors {
|
||||
val COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH by error3<KtExpression, Name, ConeKotlinType, ConeKotlinType>()
|
||||
|
||||
// Control flow diagnostics
|
||||
val UNINITIALIZED_VARIABLE by error1<KtSimpleNameExpression, FirPropertySymbol>()
|
||||
val UNINITIALIZED_VARIABLE by error1<KtExpression, FirPropertySymbol>()
|
||||
val UNINITIALIZED_PARAMETER by error1<KtSimpleNameExpression, FirValueParameterSymbol>()
|
||||
val UNINITIALIZED_ENUM_ENTRY by error1<KtSimpleNameExpression, FirEnumEntrySymbol>()
|
||||
val UNINITIALIZED_ENUM_COMPANION by error1<KtSimpleNameExpression, FirRegularClassSymbol>(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED)
|
||||
|
||||
Reference in New Issue
Block a user