152 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (152)
Binder\Binder.ValueChecks.cs (7)
620if (!expr.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 660expr.HasAnyErrors && valueKind == BindValueKind.RValueOrMethodGroup) 701if (expr.HasAnyErrors) 3347if (expr.HasAnyErrors) 3662if (expr.HasAnyErrors) 4050if (expr.HasAnyErrors) 4742if (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)
202if (expr.HasAnyErrors && ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral)) 374if (reportNoTargetType && !expr.HasAnyErrors) 394if (reportNoTargetType && !expr.HasAnyErrors) 561if (!expr.HasAnyErrors && !IsInsideNameof) 1218bool hasErrors = argument.HasAnyErrors; 1242bool hasErrors = argument.HasAnyErrors; 1266bool hasErrors = argument.HasAnyErrors; 2541!operand.HasAnyErrors && 2706bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2730if (operand.HasAnyErrors || targetType.IsErrorType()) 3403if (!argument.HasAnyErrors) 3666if (!methodResult.Member.IsIndexer() && !argument.HasAnyErrors && parameterTypeWithAnnotations.Type.ContainsPointer()) 4038if (!size.HasAnyErrors) 4173if (!boundExpression.HasAnyErrors) 4254Debug.Assert(init.HasAnyErrors); 4323if (!result.HasAnyErrors) 4390if (!size.HasAnyErrors && knownSizes[i] == null) 4402hasErrors = hasErrors || initializer.HasAnyErrors; 4624if (!sizeOpt.HasAnyErrors) 4658if (expression.HasAnyErrors) 4677if (expression.HasAnyErrors) 5811hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 5816if (boundMember.HasAnyErrors) 5834hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 6038Debug.Assert(boundMember.HasAnyErrors); 6056if (!boundMemberInitializer.HasAnyErrors) 6453hasErrors: dynamicInvocation.HasAnyErrors); 6479boundCall.HasAnyErrors) 7719if (!boundLeft.HasAnyErrors) 7896if (!expr.HasAnyErrors) 8036if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 9007if (analyzedArguments.HasErrors || expr.HasAnyErrors) 9261if (!expr.HasAnyErrors) 9352if (rank == 1 && !index.HasAnyErrors) 10948if (receiver.HasAnyErrors || access.HasAnyErrors) 11109if (receiver.HasAnyErrors)
Binder\Binder_Initializers.cs (1)
251if (isLast && !statement.HasAnyErrors)
Binder\Binder_Invocation.cs (7)
278else if ((object)argument.Type == null && !argument.HasAnyErrors) 376if (!boundExpression.HasAnyErrors) 720if (!methodGroup.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 1045if (!call.HasAnyErrors && call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null) 1067if (!dynInvoke.HasAnyErrors && 2226bool syntaxIsOk = CheckSyntaxForNameofArgument(argument, out string name, boundArgument.HasAnyErrors ? BindingDiagnosticBag.Discarded : diagnostics); 2227if (!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) 1793if (left.HasAnyErrors || right.HasAnyErrors) 2268if (operand.HasAnyErrors) 2478hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 2515bool hasErrors = operand.HasAnyErrors; // This would propagate automatically, but by reading it explicitly we can reduce cascading. 2852if (operand.HasAnyErrors) 3163if (!operand.HasAnyErrors) 3174if (!operand.HasAnyErrors) 3187return operand.HasAnyErrors; 3711if (!operand.HasAnyErrors) 3728if (operand.HasAnyErrors || targetTypeKind == TypeKind.Error) 3987if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4176if (leftOperand.HasAnyErrors || rightOperand.HasAnyErrors) 4325hasErrors = trueExpr.HasAnyErrors || falseExpr.HasAnyErrors;
Binder\Binder_Patterns.cs (3)
1567hasErrors |= boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 1589Debug.Assert(boundMember.HasAnyErrors);
Binder\Binder_Query.cs (10)
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; 931if (ultimateReceiver.HasAnyErrors || node.HasErrors) 992if (!receiver.HasAnyErrors && !node.HasErrors)
Binder\Binder_Statements.cs (15)
898if (!expression.HasAnyErrors && !expression.HasExpressionType()) 1227if (initializerOpt?.HasAnyErrors != false) 1483bool hasErrors = op1.HasAnyErrors || op2.HasAnyErrors; 1485if (!op1.HasAnyErrors) 1538if (!op1.HasAnyErrors) 1933if (expression.HasAnyErrors && expression.Kind != BoundKind.UnboundLambda) 2437Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting"); 2639if (expr.HasAnyErrors) 3157if (!argument.HasAnyErrors || argument.Kind == BoundKind.UnboundLambda) 3276hasError |= boundFilter.HasAnyErrors; 3705Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3773Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3790Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 4159patternMethodCall.HasAnyErrors)
Binder\DecisionDagBuilder.cs (2)
572RoslynDebug.Assert(recursive.HasAnyErrors); 587Debug.Assert(recursive.HasAnyErrors);
Binder\ForEachLoopBinder.cs (1)
937Debug.Assert(collectionExpr.HasAnyErrors); // should already have been reported
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1160if (argument.HasAnyErrors)
Binder\SwitchBinder.cs (2)
440if (!switchGoverningExpression.HasAnyErrors) 503hasErrors = hasErrors || gotoCaseExpressionOpt.HasAnyErrors;
Compilation\CSharpSemanticModel.cs (2)
4348else if (methodGroup.Length == 1 && !boundNode.HasAnyErrors) 4436else 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)
1001processedInitializers.HasErrors = processedInitializers.HasErrors || analyzedInitializers.HasAnyErrors; 1276hasErrors = lowered.HasAnyErrors || diagsForCurrentMethod.HasAnyErrors(); 2349Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 2360if (ctorCall != null && !ctorCall.HasAnyErrors && ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\AbstractFlowPass.cs (2)
2197Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)GetWriteMethod(property)); 2809Debug.Assert(node.HasAnyErrors || (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
902if (value == null || value.HasAnyErrors) return true;
FlowAnalysis\NullableWalker.cs (1)
3557bool 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 (10)
371Debug.Assert(loweredLeft.HasAnyErrors || loweredLeft.Type is { } && loweredLeft.Type.IsStringType()); 372Debug.Assert(loweredRight.HasAnyErrors || loweredRight.Type is { } && loweredRight.Type.IsStringType()); 382Debug.Assert(loweredFirst.HasAnyErrors || loweredFirst.Type is { } && loweredFirst.Type.IsStringType()); 383Debug.Assert(loweredSecond.HasAnyErrors || loweredSecond.Type is { } && loweredSecond.Type.IsStringType()); 384Debug.Assert(loweredThird.HasAnyErrors || loweredThird.Type is { } && loweredThird.Type.IsStringType()); 394Debug.Assert(loweredFirst.HasAnyErrors || loweredFirst.Type is { } && loweredFirst.Type.IsStringType()); 395Debug.Assert(loweredSecond.HasAnyErrors || loweredSecond.Type is { } && loweredSecond.Type.IsStringType()); 396Debug.Assert(loweredThird.HasAnyErrors || loweredThird.Type is { } && loweredThird.Type.IsStringType()); 397Debug.Assert(loweredFourth.HasAnyErrors || loweredFourth.Type is { } && loweredFourth.Type.IsStringType()); 568Debug.Assert(arg.HasAnyErrors || arg.Type.SpecialType == SpecialType.System_String);
Symbols\ConstantValueUtils.cs (1)
87if (!boundValue.HasAnyErrors)
Symbols\Source\ParameterHelpers.cs (1)
769else if (!defaultExpression.HasAnyErrors &&