void (@NotNull PsiBinaryExpression expression) { super.visitBinaryExpression(expression); final IElementType tokenType = expression.getOperationTokenType(); if (!tokenType.equals(JavaTokenType.EQEQ) && !tokenType.equals(JavaTokenType.NE)) { return; } final PsiExpression lhs = expression.getLOperand(); final PsiType lhsType = lhs.getType(); final PsiExpression rhs = expression.getROperand(); if (rhs == null) { return; } final PsiType rhsType = rhs.getType(); if (lhsType == null || rhsType == null || TypeConversionUtil.isPrimitiveAndNotNull(lhsType) || TypeConversionUtil.isPrimitiveAndNotNull(rhsType) || !TypeUtils.areConvertible(lhsType, rhsType) /* red code */) { return; } if (LambdaUtil.notInferredType(lhsType) || LambdaUtil.notInferredType(rhsType)) return; TypeMismatch mismatch = InconvertibleTypesChecker.deepCheck(lhsType, rhsType, getMutualSubclassMode()); if (mismatch != null) { registerError(expression.getOperationSign(), mismatch); } }