152 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (152)
Binder\Binder.ValueChecks.cs (7)
620
if (!expr.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
660
expr.
HasAnyErrors
&& valueKind == BindValueKind.RValueOrMethodGroup)
701
if (expr.
HasAnyErrors
)
3347
if (expr.
HasAnyErrors
)
3662
if (expr.
HasAnyErrors
)
4050
if (expr.
HasAnyErrors
)
4742
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
;
2541
!operand.
HasAnyErrors
&&
2706
bool suppressErrors = operand.
HasAnyErrors
|| targetType.IsErrorType();
2730
if (operand.
HasAnyErrors
|| targetType.IsErrorType())
3403
if (!argument.
HasAnyErrors
)
3666
if (!methodResult.Member.IsIndexer() && !argument.
HasAnyErrors
&& parameterTypeWithAnnotations.Type.ContainsPointer())
4038
if (!size.
HasAnyErrors
)
4173
if (!boundExpression.
HasAnyErrors
)
4254
Debug.Assert(init.
HasAnyErrors
);
4323
if (!result.
HasAnyErrors
)
4390
if (!size.
HasAnyErrors
&& knownSizes[i] == null)
4402
hasErrors = hasErrors || initializer.
HasAnyErrors
;
4624
if (!sizeOpt.
HasAnyErrors
)
4658
if (expression.
HasAnyErrors
)
4677
if (expression.
HasAnyErrors
)
5811
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
5816
if (boundMember.
HasAnyErrors
)
5834
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
6038
Debug.Assert(boundMember.
HasAnyErrors
);
6056
if (!boundMemberInitializer.
HasAnyErrors
)
6453
hasErrors: dynamicInvocation.
HasAnyErrors
);
6479
boundCall.
HasAnyErrors
)
7719
if (!boundLeft.
HasAnyErrors
)
7896
if (!expr.
HasAnyErrors
)
8036
if (boundLeft.
HasAnyErrors
&& boundLeft.Kind != BoundKind.TypeOrValueExpression)
9007
if (analyzedArguments.HasErrors || expr.
HasAnyErrors
)
9261
if (!expr.
HasAnyErrors
)
9352
if (rank == 1 && !index.
HasAnyErrors
)
10948
if (receiver.
HasAnyErrors
|| access.
HasAnyErrors
)
11109
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
)
1793
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
2268
if (operand.
HasAnyErrors
)
2478
hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
2515
bool hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
2852
if (operand.
HasAnyErrors
)
3163
if (!operand.
HasAnyErrors
)
3174
if (!operand.
HasAnyErrors
)
3187
return operand.
HasAnyErrors
;
3711
if (!operand.
HasAnyErrors
)
3728
if (operand.
HasAnyErrors
|| targetTypeKind == TypeKind.Error)
3987
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
4176
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
4325
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 (15)
898
if (!expression.
HasAnyErrors
&& !expression.HasExpressionType())
1227
if (initializerOpt?.
HasAnyErrors
!= false)
1483
bool hasErrors = op1.
HasAnyErrors
|| op2.
HasAnyErrors
;
1485
if (!op1.
HasAnyErrors
)
1538
if (!op1.
HasAnyErrors
)
1933
if (expression.
HasAnyErrors
&& expression.Kind != BoundKind.UnboundLambda)
2437
Debug.Assert(operand.
HasAnyErrors
&& operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting");
2639
if (expr.
HasAnyErrors
)
3157
if (!argument.
HasAnyErrors
|| argument.Kind == BoundKind.UnboundLambda)
3276
hasError |= boundFilter.
HasAnyErrors
;
3705
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3773
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3790
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)
4348
else if (methodGroup.Length == 1 && !boundNode.
HasAnyErrors
)
4436
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));
2809
Debug.Assert(node.
HasAnyErrors
|| (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
902
if (value == null || value.
HasAnyErrors
) return true;
FlowAnalysis\NullableWalker.cs (1)
3557
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
&&