fixed bug

NULL_FOR_NONNULL_TYPE can represent type mismatch error as well
(later the whole method 'makeTraceInterceptingTypeMismatch' should be removed)
This commit is contained in:
Svetlana Isakova
2013-09-16 16:47:37 +04:00
parent dd847030fa
commit 845b6f7d7e
3 changed files with 16 additions and 1 deletions
@@ -462,7 +462,7 @@ public class ExpressionTypingUtils {
@Override
public void report(@NotNull Diagnostic diagnostic) {
AbstractDiagnosticFactory factory = diagnostic.getFactory();
if ((factory == TYPE_MISMATCH || factory == CONSTANT_EXPECTED_TYPE_MISMATCH)
if ((factory == TYPE_MISMATCH || factory == CONSTANT_EXPECTED_TYPE_MISMATCH || factory == NULL_FOR_NONNULL_TYPE)
&& diagnostic.getPsiElement() == expressionToWatch) {
mismatchFound[0] = true;
}