fix KT-9652 Warning to specify expected type as Any? when it is already Any?

#KT-9652 Fixed
This commit is contained in:
Michael Nedzelsky
2015-10-29 21:16:19 +03:00
parent c318a13e6c
commit e6a2bd05d4
3 changed files with 40 additions and 0 deletions
@@ -286,6 +286,9 @@ public class DataFlowAnalyzer {
return expressionType;
}
}
else if (isIfExpression && context.expectedType != NO_EXPECTED_TYPE) {
return expressionType;
}
else {
context.trace.report(IMPLICIT_CAST_TO_UNIT_OR_ANY.on(expression, expressionType));
}