Nullability requirement violation fixed
This commit is contained in:
@@ -2,6 +2,7 @@ package org.jetbrains.jet.lang.psi;
|
||||
|
||||
import com.intellij.lang.ASTNode;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
@@ -16,6 +17,7 @@ public class JetParenthesizedExpression extends JetExpression {
|
||||
visitor.visitParenthesizedExpression(this);
|
||||
}
|
||||
|
||||
@Nullable @IfNotParsed
|
||||
public JetExpression getExpression() {
|
||||
return findChildByClass(JetExpression.class);
|
||||
}
|
||||
|
||||
@@ -398,7 +398,10 @@ public class JetTypeInferrer {
|
||||
|
||||
@Override
|
||||
public void visitParenthesizedExpression(JetParenthesizedExpression expression) {
|
||||
result = getType(scope, expression.getExpression(), false);
|
||||
JetExpression inner = expression.getExpression();
|
||||
if (inner != null) {
|
||||
result = getType(scope, inner, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user