153 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (153)
Binder\Binder.ValueChecks.cs (7)
450
if (!expr.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
490
expr.
HasAnyErrors
&& valueKind == BindValueKind.RValueOrMethodGroup)
531
if (expr.
HasAnyErrors
)
2915
if (expr.
HasAnyErrors
)
3158
if (expr.
HasAnyErrors
)
3473
if (expr.
HasAnyErrors
)
3880
if (expr.
HasAnyErrors
)
Binder\Binder_AnonymousTypes.cs (1)
216
if (!expression.
HasAnyErrors
)
Binder\Binder_Attributes.cs (4)
281
bool hasErrors = boundAttribute.
HasAnyErrors
;
867
bool curArgumentHasErrors = parentHasErrors || argument.
HasAnyErrors
;
911
visitedArgument = new KeyValuePair<String, TypedConstant>(fa.FieldSymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.
HasAnyErrors
));
916
visitedArgument = new KeyValuePair<String, TypedConstant>(pa.PropertySymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.
HasAnyErrors
));
Binder\Binder_Await.cs (5)
79
expression.
HasAnyErrors
)
297
if (expression.
HasAnyErrors
)
334
if (getAwaiterCall.
HasAnyErrors
) // && !expression.HasAnyErrors?
372
if (qualified.
HasAnyErrors
)
438
if (getAwaiterGetResultCall.
HasAnyErrors
)
Binder\Binder_Conversions.cs (1)
1582
if (source.
HasAnyErrors
)
Binder\Binder_Deconstruct.cs (1)
280
if (deconstructInvocation.
HasAnyErrors
)
Binder\Binder_Expressions.cs (37)
199
if (expr.
HasAnyErrors
&& ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral))
371
if (reportNoTargetType && !expr.
HasAnyErrors
)
542
if (!expr.
HasAnyErrors
&& !IsInsideNameof)
1182
bool hasErrors = argument.
HasAnyErrors
;
1206
bool hasErrors = argument.
HasAnyErrors
;
1230
bool hasErrors = argument.
HasAnyErrors
;
2331
!operand.
HasAnyErrors
&&
2496
bool suppressErrors = operand.
HasAnyErrors
|| targetType.IsErrorType();
2520
if (operand.
HasAnyErrors
|| targetType.IsErrorType())
3223
if (!methodResult.Member.IsIndexer() && !argument.
HasAnyErrors
&& parameterTypeWithAnnotations.Type.IsUnsafe())
3384
if (!size.
HasAnyErrors
)
3519
if (!boundExpression.
HasAnyErrors
)
3600
Debug.Assert(init.
HasAnyErrors
);
3669
if (!result.
HasAnyErrors
)
3736
if (!size.
HasAnyErrors
&& knownSizes[i] == null)
3748
hasErrors = hasErrors || initializer.
HasAnyErrors
;
3970
if (!sizeOpt.
HasAnyErrors
)
4004
if (expression.
HasAnyErrors
)
4023
if (expression.
HasAnyErrors
)
4956
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
4961
if (boundMember.
HasAnyErrors
)
4980
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
5169
Debug.Assert(boundMember.
HasAnyErrors
);
5187
if (!boundMemberInitializer.
HasAnyErrors
)
5535
hasErrors: dynamicInvocation.
HasAnyErrors
);
5561
boundCall.
HasAnyErrors
)
6653
if (!boundLeft.
HasAnyErrors
)
6830
if (!expr.
HasAnyErrors
)
6970
if (boundLeft.
HasAnyErrors
&& boundLeft.Kind != BoundKind.TypeOrValueExpression)
7908
if (analyzedArguments.HasErrors || expr.
HasAnyErrors
)
7923
if (!expr.
HasAnyErrors
)
8014
if (rank == 1 && !index.
HasAnyErrors
)
9343
if (receiver.
HasAnyErrors
|| access.
HasAnyErrors
)
9504
if (receiver.
HasAnyErrors
)
Binder\Binder_Initializers.cs (1)
251
if (isLast && !statement.
HasAnyErrors
)
Binder\Binder_Invocation.cs (7)
205
else if ((object)argument.Type == null && !argument.
HasAnyErrors
)
291
if (!boundExpression.
HasAnyErrors
)
584
if (!methodGroup.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
881
if (!call.
HasAnyErrors
&& call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null)
903
if (!dynInvoke.
HasAnyErrors
&&
1890
bool syntaxIsOk = CheckSyntaxForNameofArgument(argument, out string name, boundArgument.
HasAnyErrors
? BindingDiagnosticBag.Discarded : diagnostics);
1891
if (!boundArgument.
HasAnyErrors
&& syntaxIsOk && boundArgument.Kind == BoundKind.MethodGroup)
Binder\Binder_Operators.cs (23)
46
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
513
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
918
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
1762
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
2237
if (operand.
HasAnyErrors
)
2447
hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
2484
bool hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
2809
if (operand.
HasAnyErrors
)
3120
if (!operand.
HasAnyErrors
)
3131
if (!operand.
HasAnyErrors
)
3144
return operand.
HasAnyErrors
;
3639
if (!operand.
HasAnyErrors
)
3656
if (operand.
HasAnyErrors
|| targetTypeKind == TypeKind.Error)
3910
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
4099
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
4250
hasErrors = trueExpr.
HasAnyErrors
|| falseExpr.
HasAnyErrors
;
Binder\Binder_Patterns.cs (3)
1558
hasErrors |= boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
1580
Debug.Assert(boundMember.
HasAnyErrors
);
Binder\Binder_Query.cs (10)
206
if (unoptimized.
HasAnyErrors
&& !result.
HasAnyErrors
) unoptimized = null;
287
if (unoptimizedForm.
HasAnyErrors
&& !result.
HasAnyErrors
) unoptimizedForm = null;
732
if (!yExpression.
HasAnyErrors
&& !yExpression.HasExpressionType())
737
else if (!yExpression.
HasAnyErrors
&& yExpression.Type!.IsVoidType())
786
if (unoptimizedForm != null && unoptimizedForm.
HasAnyErrors
&& !expression.
HasAnyErrors
) unoptimizedForm = null;
930
if (ultimateReceiver.
HasAnyErrors
|| node.HasErrors)
991
if (!receiver.
HasAnyErrors
&& !node.HasErrors)
Binder\Binder_Statements.cs (16)
243
if (!argument.
HasAnyErrors
)
901
if (!expression.
HasAnyErrors
&& !expression.HasExpressionType())
1236
if (initializerOpt?.
HasAnyErrors
!= false)
1492
bool hasErrors = op1.
HasAnyErrors
|| op2.
HasAnyErrors
;
1494
if (!op1.
HasAnyErrors
)
1547
if (!op1.
HasAnyErrors
)
1923
if (expression.
HasAnyErrors
&& expression.Kind != BoundKind.UnboundLambda)
2400
Debug.Assert(operand.
HasAnyErrors
&& operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting");
2541
if (expr.
HasAnyErrors
)
3059
if (!argument.
HasAnyErrors
)
3178
hasError |= boundFilter.
HasAnyErrors
;
3607
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3675
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3692
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
4063
patternMethodCall.
HasAnyErrors
)
Binder\DecisionDagBuilder.cs (2)
569
RoslynDebug.Assert(recursive.
HasAnyErrors
);
584
Debug.Assert(recursive.
HasAnyErrors
);
Binder\ForEachLoopBinder.cs (1)
766
Debug.Assert(collectionExpr.
HasAnyErrors
); // should already have been reported
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (1)
119
if (argument.
HasAnyErrors
)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1125
if (argument.
HasAnyErrors
)
Binder\SwitchBinder.cs (2)
436
if (!switchGoverningExpression.
HasAnyErrors
)
499
hasErrors = hasErrors || gotoCaseExpressionOpt.
HasAnyErrors
;
Compilation\CSharpSemanticModel.cs (2)
4333
else if (methodGroup.Length == 1 && !boundNode.
HasAnyErrors
)
4421
else if (propertyGroup.Length == 1 && !boundNode.
HasAnyErrors
)
Compilation\MemberSemanticModel.cs (2)
942
Debug.Assert(enumeratorInfoOpt != null || boundForEach.
HasAnyErrors
);
1015
Debug.Assert(boundDeconstruction != null || boundForEach.
HasAnyErrors
);
Compiler\MethodCompiler.cs (4)
1052
processedInitializers.HasErrors = processedInitializers.HasErrors || analyzedInitializers.
HasAnyErrors
;
1319
hasErrors = lowered.
HasAnyErrors
|| diagsForCurrentMethod.HasAnyErrors();
2287
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
2298
if (ctorCall != null && !ctorCall.
HasAnyErrors
&& ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\AbstractFlowPass.cs (2)
2024
Debug.Assert(node.
HasAnyErrors
|| (object)readMethod != (object)GetWriteMethod(property));
2617
Debug.Assert(node.
HasAnyErrors
|| (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
872
if (value == null || value.
HasAnyErrors
) return true;
FlowAnalysis\NullableWalker.cs (1)
325
private bool ShouldMakeNotNullRvalue(BoundExpression node) => node.IsSuppressed || node.
HasAnyErrors
|| !IsReachable();
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
230
if (!node.
HasAnyErrors
)
Lowering\DiagnosticsPass_Warnings.cs (4)
188
if (expr1.
HasAnyErrors
|| expr2.
HasAnyErrors
)
386
if (!node.
HasAnyErrors
&& IsSameLocalOrField(node.Left, node.Right))
879
if (!node.
HasAnyErrors
&& IsSameLocalOrField(node.Left, node.Right))
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (9)
302
Debug.Assert(loweredLeft.
HasAnyErrors
|| loweredLeft.Type is { } && loweredLeft.Type.IsStringType());
303
Debug.Assert(loweredRight.
HasAnyErrors
|| loweredRight.Type is { } && loweredRight.Type.IsStringType());
313
Debug.Assert(loweredFirst.
HasAnyErrors
|| loweredFirst.Type is { } && loweredFirst.Type.IsStringType());
314
Debug.Assert(loweredSecond.
HasAnyErrors
|| loweredSecond.Type is { } && loweredSecond.Type.IsStringType());
315
Debug.Assert(loweredThird.
HasAnyErrors
|| loweredThird.Type is { } && loweredThird.Type.IsStringType());
325
Debug.Assert(loweredFirst.
HasAnyErrors
|| loweredFirst.Type is { } && loweredFirst.Type.IsStringType());
326
Debug.Assert(loweredSecond.
HasAnyErrors
|| loweredSecond.Type is { } && loweredSecond.Type.IsStringType());
327
Debug.Assert(loweredThird.
HasAnyErrors
|| loweredThird.Type is { } && loweredThird.Type.IsStringType());
328
Debug.Assert(loweredFourth.
HasAnyErrors
|| loweredFourth.Type is { } && loweredFourth.Type.IsStringType());
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (2)
32
if (!result.
HasAnyErrors
)
360
if (!result.
HasAnyErrors
)
Symbols\ConstantValueUtils.cs (1)
88
if (!boundValue.
HasAnyErrors
)
Symbols\Source\ParameterHelpers.cs (1)
742
else if (!defaultExpression.
HasAnyErrors
&&