147 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (147)
Binder\Binder.ValueChecks.cs (7)
623if (!expr.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 663expr.HasAnyErrors && valueKind == BindValueKind.RValueOrMethodGroup) 704if (expr.HasAnyErrors) 3431if (expr.HasAnyErrors) 3753if (expr.HasAnyErrors) 4148if (expr.HasAnyErrors) 4879if (expr.HasAnyErrors)
Binder\Binder_AnonymousTypes.cs (1)
216if (!expression.HasAnyErrors)
Binder\Binder_Attributes.cs (5)
290bool hasErrors = boundAttribute.HasAnyErrors; 772bool curArgumentHasErrors = parentHasErrors || argument.HasAnyErrors; 816visitedArgument = new KeyValuePair<String, TypedConstant>(fa.FieldSymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors)); 821visitedArgument = new KeyValuePair<String, TypedConstant>(pa.PropertySymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.HasAnyErrors)); 882builder.Add(VisitCollectionExpressionElement(element, diagnostics, ref attrHasErrors, curArgumentHasErrors || element.HasAnyErrors));
Binder\Binder_Await.cs (5)
79expression.HasAnyErrors) 297if (expression.HasAnyErrors) 334if (getAwaiterCall.HasAnyErrors) // && !expression.HasAnyErrors? 373if (qualified.HasAnyErrors) 439if (getAwaiterGetResultCall.HasAnyErrors)
Binder\Binder_Conversions.cs (2)
1370if (!methodGroup.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 3159if (source.HasAnyErrors)
Binder\Binder_Deconstruct.cs (1)
280if (deconstructInvocation.HasAnyErrors)
Binder\Binder_Expressions.cs (39)
207if (expr.HasAnyErrors && ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral)) 379if (reportNoTargetType && !expr.HasAnyErrors) 399if (reportNoTargetType && !expr.HasAnyErrors) 568if (!expr.HasAnyErrors && !IsInsideNameof) 1225bool hasErrors = argument.HasAnyErrors; 1249bool hasErrors = argument.HasAnyErrors; 1273bool hasErrors = argument.HasAnyErrors; 2591!operand.HasAnyErrors && 2756bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2780if (operand.HasAnyErrors || targetType.IsErrorType()) 3651if (!methodResult.Member.IsIndexer() && !argument.HasAnyErrors && parameterTypeWithAnnotations.Type.ContainsPointerOrFunctionPointer()) 3893if (argument.HasAnyErrors) 4094if (!size.HasAnyErrors) 4229if (!boundExpression.HasAnyErrors) 4310Debug.Assert(init.HasAnyErrors); 4379if (!result.HasAnyErrors) 4446if (!size.HasAnyErrors && knownSizes[i] == null) 4458hasErrors = hasErrors || initializer.HasAnyErrors; 4680if (!sizeOpt.HasAnyErrors) 4714if (expression.HasAnyErrors) 4733if (expression.HasAnyErrors) 5867hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 5872if (boundMember.HasAnyErrors) 5890hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 6094Debug.Assert(boundMember.HasAnyErrors); 6112if (!boundMemberInitializer.HasAnyErrors) 6509hasErrors: dynamicInvocation.HasAnyErrors); 6535boundCall.HasAnyErrors) 7773if (!boundLeft.HasAnyErrors) 7967if (!expr.HasAnyErrors) 8192if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 9396if (analyzedArguments.HasErrors || expr.HasAnyErrors) 9650if (!expr.HasAnyErrors) 9741if (rank == 1 && !index.HasAnyErrors) 11344if (receiver.HasAnyErrors || access.HasAnyErrors) 11510if (receiver.HasAnyErrors)
Binder\Binder_Initializers.cs (1)
251if (isLast && !statement.HasAnyErrors)
Binder\Binder_Invocation.cs (8)
278else if ((object)argument.Type == null && !argument.HasAnyErrors) 378if (!boundExpression.HasAnyErrors) 732anyApplicableCandidates = !extensionMemberInvocation.HasAnyErrors; 738if (!methodGroup.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 1062if (!call.HasAnyErrors && call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null && !call.Method.GetIsNewExtensionMember()) 1084if (!dynInvoke.HasAnyErrors && 2308bool syntaxIsOk = CheckSyntaxForNameofArgument(argument, out string name, boundArgument.HasAnyErrors ? BindingDiagnosticBag.Discarded : diagnostics); 2311if (!boundArgument.HasAnyErrors && syntaxIsOk)
Binder\Binder_Operators.cs (23)
49if (left.HasAnyErrors || right.HasAnyErrors) 912if (left.HasAnyErrors || right.HasAnyErrors) 1402if (left.HasAnyErrors || right.HasAnyErrors) 2641if (left.HasAnyErrors || right.HasAnyErrors) 3125if (operand.HasAnyErrors) 3905hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 3942bool hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 4279if (operand.HasAnyErrors) 4590if (!operand.HasAnyErrors) 4601if (!operand.HasAnyErrors) 4614return operand.HasAnyErrors; 5138if (!operand.HasAnyErrors) 5155if (operand.HasAnyErrors || targetTypeKind == TypeKind.Error) 5414if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 5603if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 5752hasErrors = trueExpr.HasAnyErrors || falseExpr.HasAnyErrors;
Binder\Binder_Patterns.cs (3)
1568hasErrors |= boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 1590Debug.Assert(boundMember.HasAnyErrors);
Binder\Binder_Query.cs (11)
206if (unoptimized.HasAnyErrors && !result.HasAnyErrors) unoptimized = null; 287if (unoptimizedForm.HasAnyErrors && !result.HasAnyErrors) unoptimizedForm = null; 733if (!yExpression.HasAnyErrors && !yExpression.HasExpressionType()) 738else if (!yExpression.HasAnyErrors && yExpression.Type!.IsVoidType()) 787if (unoptimizedForm != null && unoptimizedForm.HasAnyErrors && !expression.HasAnyErrors) unoptimizedForm = null; 931Debug.Assert(ultimateReceiver.Kind != BoundKind.MethodGroup || ultimateReceiver.HasAnyErrors); 933if (ultimateReceiver.HasAnyErrors || node.HasErrors) 976if (!receiver.HasAnyErrors && !node.HasErrors)
Binder\Binder_Statements.cs (14)
900if (!expression.HasAnyErrors && !expression.HasExpressionType()) 1227if (initializerOpt?.HasAnyErrors != false) 1483bool hasErrors = op1.HasAnyErrors || op2.HasAnyErrors; 1552if (!op1.HasAnyErrors) 1948if (expression.HasAnyErrors && expression.Kind != BoundKind.UnboundLambda) 2456Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting"); 2658if (expr.HasAnyErrors) 3174if (!argument.HasAnyErrors || argument.Kind == BoundKind.UnboundLambda) 3293hasError |= boundFilter.HasAnyErrors; 3724Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3792Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3809Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 4177patternMethodCall.HasAnyErrors)
Binder\DecisionDagBuilder.cs (2)
572RoslynDebug.Assert(recursive.HasAnyErrors); 587Debug.Assert(recursive.HasAnyErrors);
Binder\ForEachLoopBinder.cs (1)
952Debug.Assert(collectionExpr.HasAnyErrors); // should already have been reported
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (1)
119if (argument.HasAnyErrors)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1161if (argument.HasAnyErrors)
Binder\SwitchBinder.cs (2)
440if (!switchGoverningExpression.HasAnyErrors) 503hasErrors = hasErrors || gotoCaseExpressionOpt.HasAnyErrors;
Compilation\CSharpSemanticModel.cs (2)
4367else if (memberGroup.Length == 1 && !boundNode.HasAnyErrors) 4455else if (propertyGroup.Length == 1 && !boundNode.HasAnyErrors)
Compilation\MemberSemanticModel.cs (2)
953Debug.Assert(enumeratorInfoOpt != null || boundForEach.HasAnyErrors); 1025Debug.Assert(boundDeconstruction != null || boundForEach.HasAnyErrors);
Compiler\MethodCompiler.cs (4)
1031processedInitializers.HasErrors = processedInitializers.HasErrors || analyzedInitializers.HasAnyErrors; 1309hasErrors = lowered.HasAnyErrors || diagsForCurrentMethod.HasAnyErrors(); 2459Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 2470if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\AbstractFlowPass.cs (2)
2203Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)GetWriteMethod(property)); 2840Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
903if (value == null || value.HasAnyErrors) return true;
FlowAnalysis\NullableWalker.cs (1)
3715bool shouldMakeNotNullRvalue(BoundExpression node) => node.IsSuppressed || node.HasAnyErrors || !IsReachable();
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
241if (!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 (1)
505Debug.Assert(arg.HasAnyErrors || arg.Type.SpecialType == SpecialType.System_String);
Symbols\ConstantValueUtils.cs (1)
87if (!boundValue.HasAnyErrors)
Symbols\Source\ParameterHelpers.cs (1)
964else if (!defaultExpression.HasAnyErrors &&