no report 'UNNECESSARY_NOT_NULL_ASSERTION' on error types
This commit is contained in:
+1
-1
@@ -885,7 +885,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
return typeInfo;
|
||||
}
|
||||
DataFlowInfo dataFlowInfo = typeInfo.getDataFlowInfo();
|
||||
if (isKnownToBeNotNull(baseExpression, context)) {
|
||||
if (isKnownToBeNotNull(baseExpression, context) && !ErrorUtils.isErrorType(type)) {
|
||||
context.trace.report(UNNECESSARY_NOT_NULL_ASSERTION.on(operationSign, type));
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user