151 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (151)
Binder\Binder.ValueChecks.cs (7)
597
if (!expr.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
637
expr.
HasAnyErrors
&& valueKind == BindValueKind.RValueOrMethodGroup)
678
if (expr.
HasAnyErrors
)
3324
if (expr.
HasAnyErrors
)
3639
if (expr.
HasAnyErrors
)
4027
if (expr.
HasAnyErrors
)
4724
if (expr.
HasAnyErrors
)
Binder\Binder_AnonymousTypes.cs (1)
216
if (!expression.
HasAnyErrors
)
Binder\Binder_Attributes.cs (5)
290
bool hasErrors = boundAttribute.
HasAnyErrors
;
772
bool curArgumentHasErrors = parentHasErrors || argument.
HasAnyErrors
;
816
visitedArgument = new KeyValuePair<String, TypedConstant>(fa.FieldSymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.
HasAnyErrors
));
821
visitedArgument = new KeyValuePair<String, TypedConstant>(pa.PropertySymbol.Name, VisitExpression(assignment.Right, diagnostics, ref attrHasErrors, assignment.
HasAnyErrors
));
882
builder.Add(VisitCollectionExpressionElement(element, diagnostics, ref attrHasErrors, curArgumentHasErrors || element.
HasAnyErrors
));
Binder\Binder_Await.cs (5)
79
expression.
HasAnyErrors
)
297
if (expression.
HasAnyErrors
)
334
if (getAwaiterCall.
HasAnyErrors
) // && !expression.HasAnyErrors?
373
if (qualified.
HasAnyErrors
)
439
if (getAwaiterGetResultCall.
HasAnyErrors
)
Binder\Binder_Deconstruct.cs (1)
280
if (deconstructInvocation.
HasAnyErrors
)
Binder\Binder_Expressions.cs (39)
202
if (expr.
HasAnyErrors
&& ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral))
374
if (reportNoTargetType && !expr.
HasAnyErrors
)
394
if (reportNoTargetType && !expr.
HasAnyErrors
)
561
if (!expr.
HasAnyErrors
&& !IsInsideNameof)
1218
bool hasErrors = argument.
HasAnyErrors
;
1242
bool hasErrors = argument.
HasAnyErrors
;
1266
bool hasErrors = argument.
HasAnyErrors
;
2544
!operand.
HasAnyErrors
&&
2709
bool suppressErrors = operand.
HasAnyErrors
|| targetType.IsErrorType();
2733
if (operand.
HasAnyErrors
|| targetType.IsErrorType())
3406
if (!argument.
HasAnyErrors
)
3669
if (!methodResult.Member.IsIndexer() && !argument.
HasAnyErrors
&& parameterTypeWithAnnotations.Type.ContainsPointer())
4041
if (!size.
HasAnyErrors
)
4176
if (!boundExpression.
HasAnyErrors
)
4257
Debug.Assert(init.
HasAnyErrors
);
4326
if (!result.
HasAnyErrors
)
4393
if (!size.
HasAnyErrors
&& knownSizes[i] == null)
4405
hasErrors = hasErrors || initializer.
HasAnyErrors
;
4627
if (!sizeOpt.
HasAnyErrors
)
4661
if (expression.
HasAnyErrors
)
4680
if (expression.
HasAnyErrors
)
5814
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
5819
if (boundMember.
HasAnyErrors
)
5837
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
6041
Debug.Assert(boundMember.
HasAnyErrors
);
6059
if (!boundMemberInitializer.
HasAnyErrors
)
6456
hasErrors: dynamicInvocation.
HasAnyErrors
);
6482
boundCall.
HasAnyErrors
)
7720
if (!boundLeft.
HasAnyErrors
)
7897
if (!expr.
HasAnyErrors
)
8037
if (boundLeft.
HasAnyErrors
&& boundLeft.Kind != BoundKind.TypeOrValueExpression)
9008
if (analyzedArguments.HasErrors || expr.
HasAnyErrors
)
9262
if (!expr.
HasAnyErrors
)
9353
if (rank == 1 && !index.
HasAnyErrors
)
10949
if (receiver.
HasAnyErrors
|| access.
HasAnyErrors
)
11110
if (receiver.
HasAnyErrors
)
Binder\Binder_Initializers.cs (1)
251
if (isLast && !statement.
HasAnyErrors
)
Binder\Binder_Invocation.cs (7)
278
else if ((object)argument.Type == null && !argument.
HasAnyErrors
)
376
if (!boundExpression.
HasAnyErrors
)
720
if (!methodGroup.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
1045
if (!call.
HasAnyErrors
&& call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null)
1067
if (!dynInvoke.
HasAnyErrors
&&
2226
bool syntaxIsOk = CheckSyntaxForNameofArgument(argument, out string name, boundArgument.
HasAnyErrors
? BindingDiagnosticBag.Discarded : diagnostics);
2227
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
)
949
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
1798
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
2273
if (operand.
HasAnyErrors
)
2483
hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
2520
bool hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
2857
if (operand.
HasAnyErrors
)
3168
if (!operand.
HasAnyErrors
)
3179
if (!operand.
HasAnyErrors
)
3192
return operand.
HasAnyErrors
;
3716
if (!operand.
HasAnyErrors
)
3733
if (operand.
HasAnyErrors
|| targetTypeKind == TypeKind.Error)
3992
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
4181
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
4330
hasErrors = trueExpr.
HasAnyErrors
|| falseExpr.
HasAnyErrors
;
Binder\Binder_Patterns.cs (3)
1567
hasErrors |= boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
1589
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;
733
if (!yExpression.
HasAnyErrors
&& !yExpression.HasExpressionType())
738
else if (!yExpression.
HasAnyErrors
&& yExpression.Type!.IsVoidType())
787
if (unoptimizedForm != null && unoptimizedForm.
HasAnyErrors
&& !expression.
HasAnyErrors
) unoptimizedForm = null;
931
if (ultimateReceiver.
HasAnyErrors
|| node.HasErrors)
992
if (!receiver.
HasAnyErrors
&& !node.HasErrors)
Binder\Binder_Statements.cs (14)
898
if (!expression.
HasAnyErrors
&& !expression.HasExpressionType())
1227
if (initializerOpt?.
HasAnyErrors
!= false)
1483
bool hasErrors = op1.
HasAnyErrors
|| op2.
HasAnyErrors
;
1540
if (!op1.
HasAnyErrors
)
1936
if (expression.
HasAnyErrors
&& expression.Kind != BoundKind.UnboundLambda)
2440
Debug.Assert(operand.
HasAnyErrors
&& operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting");
2642
if (expr.
HasAnyErrors
)
3160
if (!argument.
HasAnyErrors
|| argument.Kind == BoundKind.UnboundLambda)
3279
hasError |= boundFilter.
HasAnyErrors
;
3708
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3776
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3793
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
4159
patternMethodCall.
HasAnyErrors
)
Binder\DecisionDagBuilder.cs (2)
572
RoslynDebug.Assert(recursive.
HasAnyErrors
);
587
Debug.Assert(recursive.
HasAnyErrors
);
Binder\ForEachLoopBinder.cs (1)
937
Debug.Assert(collectionExpr.
HasAnyErrors
); // should already have been reported
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1160
if (argument.
HasAnyErrors
)
Binder\SwitchBinder.cs (2)
440
if (!switchGoverningExpression.
HasAnyErrors
)
503
hasErrors = hasErrors || gotoCaseExpressionOpt.
HasAnyErrors
;
Compilation\CSharpSemanticModel.cs (2)
4355
else if (methodGroup.Length == 1 && !boundNode.
HasAnyErrors
)
4443
else if (propertyGroup.Length == 1 && !boundNode.
HasAnyErrors
)
Compilation\MemberSemanticModel.cs (2)
952
Debug.Assert(enumeratorInfoOpt != null || boundForEach.
HasAnyErrors
);
1024
Debug.Assert(boundDeconstruction != null || boundForEach.
HasAnyErrors
);
Compiler\MethodCompiler.cs (4)
1001
processedInitializers.HasErrors = processedInitializers.HasErrors || analyzedInitializers.
HasAnyErrors
;
1276
hasErrors = lowered.
HasAnyErrors
|| diagsForCurrentMethod.HasAnyErrors();
2349
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
2360
if (ctorCall != null && !ctorCall.
HasAnyErrors
&& ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\AbstractFlowPass.cs (2)
2197
Debug.Assert(node.
HasAnyErrors
|| (object)readMethod != (object)GetWriteMethod(property));
2813
Debug.Assert(node.
HasAnyErrors
|| (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
902
if (value == null || value.
HasAnyErrors
) return true;
FlowAnalysis\NullableWalker.cs (1)
3618
bool shouldMakeNotNullRvalue(BoundExpression node) => node.IsSuppressed || node.
HasAnyErrors
|| !IsReachable();
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
241
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 (10)
371
Debug.Assert(loweredLeft.
HasAnyErrors
|| loweredLeft.Type is { } && loweredLeft.Type.IsStringType());
372
Debug.Assert(loweredRight.
HasAnyErrors
|| loweredRight.Type is { } && loweredRight.Type.IsStringType());
382
Debug.Assert(loweredFirst.
HasAnyErrors
|| loweredFirst.Type is { } && loweredFirst.Type.IsStringType());
383
Debug.Assert(loweredSecond.
HasAnyErrors
|| loweredSecond.Type is { } && loweredSecond.Type.IsStringType());
384
Debug.Assert(loweredThird.
HasAnyErrors
|| loweredThird.Type is { } && loweredThird.Type.IsStringType());
394
Debug.Assert(loweredFirst.
HasAnyErrors
|| loweredFirst.Type is { } && loweredFirst.Type.IsStringType());
395
Debug.Assert(loweredSecond.
HasAnyErrors
|| loweredSecond.Type is { } && loweredSecond.Type.IsStringType());
396
Debug.Assert(loweredThird.
HasAnyErrors
|| loweredThird.Type is { } && loweredThird.Type.IsStringType());
397
Debug.Assert(loweredFourth.
HasAnyErrors
|| loweredFourth.Type is { } && loweredFourth.Type.IsStringType());
568
Debug.Assert(arg.
HasAnyErrors
|| arg.Type.SpecialType == SpecialType.System_String);
Symbols\ConstantValueUtils.cs (1)
87
if (!boundValue.
HasAnyErrors
)
Symbols\Source\ParameterHelpers.cs (1)
769
else if (!defaultExpression.
HasAnyErrors
&&