NPE from EA fixed

This commit is contained in:
Svetlana Isakova
2012-04-27 22:27:38 +04:00
parent d72c655bd7
commit ebff94a632
2 changed files with 7 additions and 1 deletions
@@ -956,7 +956,8 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
}
}
private boolean isSenselessComparisonWithNull(JetType firstType, JetExpression secondExpression) {
private boolean isSenselessComparisonWithNull(@Nullable JetType firstType, @NotNull JetExpression secondExpression) {
if (firstType == null) return false;
return !firstType.isNullable() && secondExpression instanceof JetConstantExpression && secondExpression.getNode().getElementType() == JetNodeTypes.NULL;
}
@@ -0,0 +1,5 @@
package d
fun foo(<!UNUSED_PARAMETER!>a<!> : IntArray) {
if (null == <!UNRESOLVED_REFERENCE!>a<!>()<!SYNTAX!><!>
<!SYNTAX!><!>}