146 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (146)
Binder\Binder.ValueChecks.cs (7)
622if (!expr.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 662expr.HasAnyErrors && valueKind == BindValueKind.RValueOrMethodGroup) 703if (expr.HasAnyErrors) 3430if (expr.HasAnyErrors) 3745if (expr.HasAnyErrors) 4133if (expr.HasAnyErrors) 4839if (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; 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) 8193if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 9387if (analyzedArguments.HasErrors || expr.HasAnyErrors) 9641if (!expr.HasAnyErrors) 9732if (rank == 1 && !index.HasAnyErrors) 11335if (receiver.HasAnyErrors || access.HasAnyErrors) 11501if (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) 658if (left.HasAnyErrors || right.HasAnyErrors) 1094if (left.HasAnyErrors || right.HasAnyErrors) 1989if (left.HasAnyErrors || right.HasAnyErrors) 2466if (operand.HasAnyErrors) 2919hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 2956bool hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 3293if (operand.HasAnyErrors) 3604if (!operand.HasAnyErrors) 3615if (!operand.HasAnyErrors) 3628return operand.HasAnyErrors; 4152if (!operand.HasAnyErrors) 4169if (operand.HasAnyErrors || targetTypeKind == TypeKind.Error) 4428if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4617if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4766hasErrors = 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)
952Debug.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)
4366else if (memberGroup.Length == 1 && !boundNode.HasAnyErrors) 4454else 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)
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)); 2819Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
902if (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 &&