153 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (153)
Binder\Binder.ValueChecks.cs (7)
450if (!expr.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 490expr.HasAnyErrors && valueKind == BindValueKind.RValueOrMethodGroup) 531if (expr.HasAnyErrors) 2915if (expr.HasAnyErrors) 3158if (expr.HasAnyErrors) 3473if (expr.HasAnyErrors) 3880if (expr.HasAnyErrors)
Binder\Binder_AnonymousTypes.cs (1)
216if (!expression.HasAnyErrors)
Binder\Binder_Attributes.cs (4)
281bool hasErrors = boundAttribute.HasAnyErrors; 867bool curArgumentHasErrors = parentHasErrors || argument.HasAnyErrors; 911visitedArgument = new KeyValuePair<String, TypedConstant>(fa.FieldSymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors)); 916visitedArgument = new KeyValuePair<String, TypedConstant>(pa.PropertySymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors));
Binder\Binder_Await.cs (5)
79expression.HasAnyErrors) 297if (expression.HasAnyErrors) 334if (getAwaiterCall.HasAnyErrors) // && !expression.HasAnyErrors? 372if (qualified.HasAnyErrors) 438if (getAwaiterGetResultCall.HasAnyErrors)
Binder\Binder_Conversions.cs (1)
1582if (source.HasAnyErrors)
Binder\Binder_Deconstruct.cs (1)
280if (deconstructInvocation.HasAnyErrors)
Binder\Binder_Expressions.cs (37)
199if (expr.HasAnyErrors && ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral)) 371if (reportNoTargetType && !expr.HasAnyErrors) 542if (!expr.HasAnyErrors && !IsInsideNameof) 1182bool hasErrors = argument.HasAnyErrors; 1206bool hasErrors = argument.HasAnyErrors; 1230bool hasErrors = argument.HasAnyErrors; 2331!operand.HasAnyErrors && 2496bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2520if (operand.HasAnyErrors || targetType.IsErrorType()) 3223if (!methodResult.Member.IsIndexer() && !argument.HasAnyErrors && parameterTypeWithAnnotations.Type.IsUnsafe()) 3384if (!size.HasAnyErrors) 3519if (!boundExpression.HasAnyErrors) 3600Debug.Assert(init.HasAnyErrors); 3669if (!result.HasAnyErrors) 3736if (!size.HasAnyErrors && knownSizes[i] == null) 3748hasErrors = hasErrors || initializer.HasAnyErrors; 3970if (!sizeOpt.HasAnyErrors) 4004if (expression.HasAnyErrors) 4023if (expression.HasAnyErrors) 4956hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 4961if (boundMember.HasAnyErrors) 4980hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 5169Debug.Assert(boundMember.HasAnyErrors); 5187if (!boundMemberInitializer.HasAnyErrors) 5535hasErrors: dynamicInvocation.HasAnyErrors); 5561boundCall.HasAnyErrors) 6653if (!boundLeft.HasAnyErrors) 6830if (!expr.HasAnyErrors) 6970if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 7908if (analyzedArguments.HasErrors || expr.HasAnyErrors) 7923if (!expr.HasAnyErrors) 8014if (rank == 1 && !index.HasAnyErrors) 9343if (receiver.HasAnyErrors || access.HasAnyErrors) 9504if (receiver.HasAnyErrors)
Binder\Binder_Initializers.cs (1)
251if (isLast && !statement.HasAnyErrors)
Binder\Binder_Invocation.cs (7)
205else if ((object)argument.Type == null && !argument.HasAnyErrors) 291if (!boundExpression.HasAnyErrors) 584if (!methodGroup.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 881if (!call.HasAnyErrors && call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null) 903if (!dynInvoke.HasAnyErrors && 1890bool syntaxIsOk = CheckSyntaxForNameofArgument(argument, out string name, boundArgument.HasAnyErrors ? BindingDiagnosticBag.Discarded : diagnostics); 1891if (!boundArgument.HasAnyErrors && syntaxIsOk && boundArgument.Kind == BoundKind.MethodGroup)
Binder\Binder_Operators.cs (23)
46if (left.HasAnyErrors || right.HasAnyErrors) 513if (left.HasAnyErrors || right.HasAnyErrors) 918if (left.HasAnyErrors || right.HasAnyErrors) 1762if (left.HasAnyErrors || right.HasAnyErrors) 2237if (operand.HasAnyErrors) 2447hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 2484bool hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 2809if (operand.HasAnyErrors) 3120if (!operand.HasAnyErrors) 3131if (!operand.HasAnyErrors) 3144return operand.HasAnyErrors; 3639if (!operand.HasAnyErrors) 3656if (operand.HasAnyErrors || targetTypeKind == TypeKind.Error) 3910if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4099if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4250hasErrors = trueExpr.HasAnyErrors || falseExpr.HasAnyErrors;
Binder\Binder_Patterns.cs (3)
1558hasErrors |= boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 1580Debug.Assert(boundMember.HasAnyErrors);
Binder\Binder_Query.cs (10)
206if (unoptimized.HasAnyErrors && !result.HasAnyErrors) unoptimized = null; 287if (unoptimizedForm.HasAnyErrors && !result.HasAnyErrors) unoptimizedForm = null; 732if (!yExpression.HasAnyErrors && !yExpression.HasExpressionType()) 737else if (!yExpression.HasAnyErrors && yExpression.Type!.IsVoidType()) 786if (unoptimizedForm != null && unoptimizedForm.HasAnyErrors && !expression.HasAnyErrors) unoptimizedForm = null; 930if (ultimateReceiver.HasAnyErrors || node.HasErrors) 991if (!receiver.HasAnyErrors && !node.HasErrors)
Binder\Binder_Statements.cs (16)
243if (!argument.HasAnyErrors) 901if (!expression.HasAnyErrors && !expression.HasExpressionType()) 1236if (initializerOpt?.HasAnyErrors != false) 1492bool hasErrors = op1.HasAnyErrors || op2.HasAnyErrors; 1494if (!op1.HasAnyErrors) 1547if (!op1.HasAnyErrors) 1923if (expression.HasAnyErrors && expression.Kind != BoundKind.UnboundLambda) 2400Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting"); 2541if (expr.HasAnyErrors) 3059if (!argument.HasAnyErrors) 3178hasError |= boundFilter.HasAnyErrors; 3607Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3675Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3692Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 4063patternMethodCall.HasAnyErrors)
Binder\DecisionDagBuilder.cs (2)
569RoslynDebug.Assert(recursive.HasAnyErrors); 584Debug.Assert(recursive.HasAnyErrors);
Binder\ForEachLoopBinder.cs (1)
766Debug.Assert(collectionExpr.HasAnyErrors); // should already have been reported
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (1)
119if (argument.HasAnyErrors)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1125if (argument.HasAnyErrors)
Binder\SwitchBinder.cs (2)
436if (!switchGoverningExpression.HasAnyErrors) 499hasErrors = hasErrors || gotoCaseExpressionOpt.HasAnyErrors;
Compilation\CSharpSemanticModel.cs (2)
4333else if (methodGroup.Length == 1 && !boundNode.HasAnyErrors) 4421else if (propertyGroup.Length == 1 && !boundNode.HasAnyErrors)
Compilation\MemberSemanticModel.cs (2)
942Debug.Assert(enumeratorInfoOpt != null || boundForEach.HasAnyErrors); 1015Debug.Assert(boundDeconstruction != null || boundForEach.HasAnyErrors);
Compiler\MethodCompiler.cs (4)
1052processedInitializers.HasErrors = processedInitializers.HasErrors || analyzedInitializers.HasAnyErrors; 1319hasErrors = lowered.HasAnyErrors || diagsForCurrentMethod.HasAnyErrors(); 2287Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 2298if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\AbstractFlowPass.cs (2)
2024Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)GetWriteMethod(property)); 2617Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
872if (value == null || value.HasAnyErrors) return true;
FlowAnalysis\NullableWalker.cs (1)
325private bool ShouldMakeNotNullRvalue(BoundExpression node) => node.IsSuppressed || node.HasAnyErrors || !IsReachable();
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
230if (!node.HasAnyErrors)
Lowering\DiagnosticsPass_Warnings.cs (4)
188if (expr1.HasAnyErrors || expr2.HasAnyErrors) 386if (!node.HasAnyErrors && IsSameLocalOrField(node.Left, node.Right)) 879if (!node.HasAnyErrors && IsSameLocalOrField(node.Left, node.Right))
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (9)
302Debug.Assert(loweredLeft.HasAnyErrors || loweredLeft.Type is { } && loweredLeft.Type.IsStringType()); 303Debug.Assert(loweredRight.HasAnyErrors || loweredRight.Type is { } && loweredRight.Type.IsStringType()); 313Debug.Assert(loweredFirst.HasAnyErrors || loweredFirst.Type is { } && loweredFirst.Type.IsStringType()); 314Debug.Assert(loweredSecond.HasAnyErrors || loweredSecond.Type is { } && loweredSecond.Type.IsStringType()); 315Debug.Assert(loweredThird.HasAnyErrors || loweredThird.Type is { } && loweredThird.Type.IsStringType()); 325Debug.Assert(loweredFirst.HasAnyErrors || loweredFirst.Type is { } && loweredFirst.Type.IsStringType()); 326Debug.Assert(loweredSecond.HasAnyErrors || loweredSecond.Type is { } && loweredSecond.Type.IsStringType()); 327Debug.Assert(loweredThird.HasAnyErrors || loweredThird.Type is { } && loweredThird.Type.IsStringType()); 328Debug.Assert(loweredFourth.HasAnyErrors || loweredFourth.Type is { } && loweredFourth.Type.IsStringType());
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
32if (!result.HasAnyErrors) 360if (!result.HasAnyErrors)
Symbols\ConstantValueUtils.cs (1)
88if (!boundValue.HasAnyErrors)
Symbols\Source\ParameterHelpers.cs (1)
742else if (!defaultExpression.HasAnyErrors &&