Do not generate nullable types when converting "instanceof" to "is"
This commit is contained in:
@@ -192,9 +192,10 @@ public class ExpressionVisitor extends StatementVisitor {
|
||||
@Override
|
||||
public void visitInstanceOfExpression(@NotNull PsiInstanceOfExpression expression) {
|
||||
super.visitInstanceOfExpression(expression);
|
||||
myResult = new IsOperator(
|
||||
getConverter().expressionToExpression(expression.getOperand()),
|
||||
getConverter().elementToElement(expression.getCheckType()));
|
||||
|
||||
TypeElement typeElement = (TypeElement) getConverter().elementToElement(expression.getCheckType());
|
||||
typeElement.getMyType().convertedToNotNull();
|
||||
myResult = new IsOperator(getConverter().expressionToExpression(expression.getOperand()), typeElement);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1 +1 @@
|
||||
(c.getType().getName() is String?)
|
||||
(c.getType().getName() is String)
|
||||
@@ -1 +1 @@
|
||||
(a is String?)
|
||||
(a is String)
|
||||
Reference in New Issue
Block a user