144 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (144)
Binder\Binder.ValueChecks.cs (7)
627if (!expr.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 667expr.HasAnyErrors && valueKind == BindValueKind.RValueOrMethodGroup) 708if (expr.HasAnyErrors) 3427if (expr.HasAnyErrors) 3742if (expr.HasAnyErrors) 4130if (expr.HasAnyErrors) 4827if (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_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; 2589!operand.HasAnyErrors && 2754bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2778if (operand.HasAnyErrors || targetType.IsErrorType()) 3649if (!methodResult.Member.IsIndexer() && !argument.HasAnyErrors && parameterTypeWithAnnotations.Type.ContainsPointerOrFunctionPointer()) 3891if (argument.HasAnyErrors) 4092if (!size.HasAnyErrors) 4227if (!boundExpression.HasAnyErrors) 4308Debug.Assert(init.HasAnyErrors); 4377if (!result.HasAnyErrors) 4444if (!size.HasAnyErrors && knownSizes[i] == null) 4456hasErrors = hasErrors || initializer.HasAnyErrors; 4678if (!sizeOpt.HasAnyErrors) 4712if (expression.HasAnyErrors) 4731if (expression.HasAnyErrors) 5865hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 5870if (boundMember.HasAnyErrors) 5888hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 6092Debug.Assert(boundMember.HasAnyErrors); 6110if (!boundMemberInitializer.HasAnyErrors) 6507hasErrors: dynamicInvocation.HasAnyErrors); 6533boundCall.HasAnyErrors) 7771if (!boundLeft.HasAnyErrors) 7965if (!expr.HasAnyErrors) 8192if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 9386if (analyzedArguments.HasErrors || expr.HasAnyErrors) 9640if (!expr.HasAnyErrors) 9731if (rank == 1 && !index.HasAnyErrors) 11334if (receiver.HasAnyErrors || access.HasAnyErrors) 11495if (receiver.HasAnyErrors)
Binder\Binder_Initializers.cs (1)
251if (isLast && !statement.HasAnyErrors)
Binder\Binder_Invocation.cs (8)
278else if ((object)argument.Type == null && !argument.HasAnyErrors) 377if (!boundExpression.HasAnyErrors) 731anyApplicableCandidates = !extensionMemberInvocation.HasAnyErrors; 737if (!methodGroup.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 1061if (!call.HasAnyErrors && call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null && !call.Method.GetIsNewExtensionMember()) 1083if (!dynInvoke.HasAnyErrors && 2281bool syntaxIsOk = CheckSyntaxForNameofArgument(argument, out string name, boundArgument.HasAnyErrors ? BindingDiagnosticBag.Discarded : diagnostics); 2282if (!boundArgument.HasAnyErrors && syntaxIsOk && boundArgument.Kind == BoundKind.MethodGroup)
Binder\Binder_Operators.cs (23)
46if (left.HasAnyErrors || right.HasAnyErrors) 513if (left.HasAnyErrors || right.HasAnyErrors) 949if (left.HasAnyErrors || right.HasAnyErrors) 1798if (left.HasAnyErrors || right.HasAnyErrors) 2273if (operand.HasAnyErrors) 2483hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 2520bool hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 2857if (operand.HasAnyErrors) 3168if (!operand.HasAnyErrors) 3179if (!operand.HasAnyErrors) 3192return operand.HasAnyErrors; 3716if (!operand.HasAnyErrors) 3733if (operand.HasAnyErrors || targetTypeKind == TypeKind.Error) 3992if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4181if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4330hasErrors = trueExpr.HasAnyErrors || falseExpr.HasAnyErrors;
Binder\Binder_Patterns.cs (3)
1567hasErrors |= boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 1589Debug.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) 3176if (!argument.HasAnyErrors || argument.Kind == BoundKind.UnboundLambda) 3295hasError |= boundFilter.HasAnyErrors; 3726Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3794Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3811Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 4179patternMethodCall.HasAnyErrors)
Binder\DecisionDagBuilder.cs (2)
572RoslynDebug.Assert(recursive.HasAnyErrors); 587Debug.Assert(recursive.HasAnyErrors);
Binder\ForEachLoopBinder.cs (1)
948Debug.Assert(collectionExpr.HasAnyErrors); // should already have been reported
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1161if (argument.HasAnyErrors)
Binder\SwitchBinder.cs (2)
440if (!switchGoverningExpression.HasAnyErrors) 503hasErrors = hasErrors || gotoCaseExpressionOpt.HasAnyErrors;
Compilation\CSharpSemanticModel.cs (2)
4364else if (memberGroup.Length == 1 && !boundNode.HasAnyErrors) 4452else if (propertyGroup.Length == 1 && !boundNode.HasAnyErrors)
Compilation\MemberSemanticModel.cs (2)
952Debug.Assert(enumeratorInfoOpt != null || boundForEach.HasAnyErrors); 1024Debug.Assert(boundDeconstruction != null || boundForEach.HasAnyErrors);
Compiler\MethodCompiler.cs (4)
1026processedInitializers.HasErrors = processedInitializers.HasErrors || analyzedInitializers.HasAnyErrors; 1304hasErrors = lowered.HasAnyErrors || diagsForCurrentMethod.HasAnyErrors(); 2449Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 2460if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\AbstractFlowPass.cs (2)
2204Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)GetWriteMethod(property)); 2820Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
917if (value == null || value.HasAnyErrors) return true;
FlowAnalysis\NullableWalker.cs (1)
3699bool 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)
899else if (!defaultExpression.HasAnyErrors &&