[FE 1.0] Check for type mismatch for empty when statements
^KT-47922 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
60195114c1
commit
8578f0beea
@@ -305,8 +305,11 @@ public class DataFlowAnalyzer {
|
||||
}
|
||||
|
||||
if (expression instanceof KtWhenExpression) {
|
||||
// No need in additional check because type mismatch is already reported for entries
|
||||
return expressionType;
|
||||
KtWhenExpression whenExpression = (KtWhenExpression) expression;
|
||||
if (!whenExpression.getEntries().isEmpty()) {
|
||||
// No need in additional check because type mismatch is already reported for entries
|
||||
return expressionType;
|
||||
}
|
||||
}
|
||||
|
||||
SmartCastResult castResult = checkPossibleCast(expressionType, expression, c);
|
||||
|
||||
Reference in New Issue
Block a user