NPE from EA fixed
This commit is contained in:
+2
-1
@@ -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!><!>}
|
||||
Reference in New Issue
Block a user