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
|
@Override
|
||||||
public void visitInstanceOfExpression(@NotNull PsiInstanceOfExpression expression) {
|
public void visitInstanceOfExpression(@NotNull PsiInstanceOfExpression expression) {
|
||||||
super.visitInstanceOfExpression(expression);
|
super.visitInstanceOfExpression(expression);
|
||||||
myResult = new IsOperator(
|
|
||||||
getConverter().expressionToExpression(expression.getOperand()),
|
TypeElement typeElement = (TypeElement) getConverter().elementToElement(expression.getCheckType());
|
||||||
getConverter().elementToElement(expression.getCheckType()));
|
typeElement.getMyType().convertedToNotNull();
|
||||||
|
myResult = new IsOperator(getConverter().expressionToExpression(expression.getOperand()), typeElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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