151 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (151)
Binder\Binder.ValueChecks.cs (7)
597if (!expr.HasAnyErrors) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading. 637expr.HasAnyErrors && valueKind == BindValueKind.RValueOrMethodGroup) 678if (expr.HasAnyErrors) 3324if (expr.HasAnyErrors) 3639if (expr.HasAnyErrors) 4027if (expr.HasAnyErrors) 4718if (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; 2544!operand.HasAnyErrors && 2709bool suppressErrors = operand.HasAnyErrors || targetType.IsErrorType(); 2733if (operand.HasAnyErrors || targetType.IsErrorType()) 3406if (!argument.HasAnyErrors) 3669if (!methodResult.Member.IsIndexer() && !argument.HasAnyErrors && parameterTypeWithAnnotations.Type.ContainsPointer()) 4041if (!size.HasAnyErrors) 4176if (!boundExpression.HasAnyErrors) 4257Debug.Assert(init.HasAnyErrors); 4326if (!result.HasAnyErrors) 4393if (!size.HasAnyErrors && knownSizes[i] == null) 4405hasErrors = hasErrors || initializer.HasAnyErrors; 4627if (!sizeOpt.HasAnyErrors) 4661if (expression.HasAnyErrors) 4680if (expression.HasAnyErrors) 5814hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 5819if (boundMember.HasAnyErrors) 5837hasErrors = boundMember.HasAnyErrors || implicitReceiver.HasAnyErrors; 6041Debug.Assert(boundMember.HasAnyErrors); 6059if (!boundMemberInitializer.HasAnyErrors) 6456hasErrors: dynamicInvocation.HasAnyErrors); 6482boundCall.HasAnyErrors) 7722if (!boundLeft.HasAnyErrors) 7899if (!expr.HasAnyErrors) 8039if (boundLeft.HasAnyErrors && boundLeft.Kind != BoundKind.TypeOrValueExpression) 9010if (analyzedArguments.HasErrors || expr.HasAnyErrors) 9264if (!expr.HasAnyErrors) 9355if (rank == 1 && !index.HasAnyErrors) 10951if (receiver.HasAnyErrors || access.HasAnyErrors) 11112if (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 (14)
898if (!expression.HasAnyErrors && !expression.HasExpressionType()) 1227if (initializerOpt?.HasAnyErrors != false) 1483bool hasErrors = op1.HasAnyErrors || op2.HasAnyErrors; 1540if (!op1.HasAnyErrors) 1936if (expression.HasAnyErrors && expression.Kind != BoundKind.UnboundLambda) 2440Debug.Assert(operand.HasAnyErrors && operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting"); 2642if (expr.HasAnyErrors) 3160if (!argument.HasAnyErrors || argument.Kind == BoundKind.UnboundLambda) 3279hasError |= boundFilter.HasAnyErrors; 3708Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3776Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 3793Debug.Assert(initializerInvocation.HasAnyErrors || constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer."); 4162patternMethodCall.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)
4355else if (methodGroup.Length == 1 && !boundNode.HasAnyErrors) 4443else 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 &&