167 references to HasAnyErrors
Microsoft.CodeAnalysis.CSharp (167)
Binder\Binder.ValueChecks.cs (26)
144
HasAnyErrors = call.
HasAnyErrors
172
HasAnyErrors = ptrInvocation.
HasAnyErrors
186
HasAnyErrors = indexerAccess.
HasAnyErrors
201
HasAnyErrors = objectCreation.
HasAnyErrors
217
HasAnyErrors = unaryOperator.
HasAnyErrors
233
HasAnyErrors = binaryOperator.
HasAnyErrors
247
HasAnyErrors = logicalOperator.
HasAnyErrors
288
HasAnyErrors = incrementOperator.
HasAnyErrors
305
HasAnyErrors = compoundOperator.
HasAnyErrors
328
HasAnyErrors = propertyAccess.
HasAnyErrors
,
844
if (!expr.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
884
expr.
HasAnyErrors
&& valueKind == BindValueKind.RValueOrMethodGroup)
925
if (expr.
HasAnyErrors
)
3666
if (expr.
HasAnyErrors
)
3856
MethodInvocationInfo.FromInlineArrayAccess(equivalentSignatureMethod, arguments, refKinds, elementAccess.
HasAnyErrors
),
3946
if (expr.
HasAnyErrors
)
4149
MethodInvocationInfo.FromInlineArrayAccess(equivalentSignatureMethod, arguments, refKinds, elementAccess.
HasAnyErrors
),
4299
if (expr.
HasAnyErrors
)
4472
MethodInvocationInfo.FromInlineArrayAccess(equivalentSignatureMethod, arguments, refKinds, elementAccess.
HasAnyErrors
),
4561
MethodInvocationInfo.FromInlineArrayConversion(equivalentSignatureMethod, arguments, refKinds, conversion.
HasAnyErrors
),
4572
MethodInvocationInfo.FromUserDefinedConversion(operatorMethod, conversion.Operand, conversion.
HasAnyErrors
),
4884
HasAnyErrors = expr.
HasAnyErrors
,
4958
if (expr.
HasAnyErrors
)
5174
MethodInvocationInfo.FromInlineArrayAccess(equivalentSignatureMethod, arguments, refKinds, elementAccess.
HasAnyErrors
),
5304
MethodInvocationInfo.FromInlineArrayConversion(equivalentSignatureMethod, arguments, refKinds, conversion.
HasAnyErrors
),
5319
MethodInvocationInfo.FromUserDefinedConversion(operatorMethod, conversion.Operand, conversion.
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)
82
expression.
HasAnyErrors
)
543
if (expression.
HasAnyErrors
)
580
if (getAwaiterCall.
HasAnyErrors
) // && !expression.HasAnyErrors?
619
if (qualified.
HasAnyErrors
)
685
if (getAwaiterGetResultCall.
HasAnyErrors
)
Binder\Binder_Conversions.cs (2)
1370
if (!methodGroup.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
3141
if (source.
HasAnyErrors
)
Binder\Binder_Deconstruct.cs (1)
280
if (deconstructInvocation.
HasAnyErrors
)
Binder\Binder_Expressions.cs (39)
207
if (expr.
HasAnyErrors
&& ((object)resultType != null || exprKind == BoundKind.UnboundLambda || exprKind == BoundKind.DefaultLiteral))
379
if (reportNoTargetType && !expr.
HasAnyErrors
)
399
if (reportNoTargetType && !expr.
HasAnyErrors
)
568
if (!expr.
HasAnyErrors
&& !IsInsideNameof)
1225
bool hasErrors = argument.
HasAnyErrors
;
1249
bool hasErrors = argument.
HasAnyErrors
;
1273
bool hasErrors = argument.
HasAnyErrors
;
2591
!operand.
HasAnyErrors
&&
2756
bool suppressErrors = operand.
HasAnyErrors
|| targetType.IsErrorType();
2780
if (operand.
HasAnyErrors
|| targetType.IsErrorType())
3651
if (!methodResult.Member.IsIndexer() && !argument.
HasAnyErrors
&& parameterTypeWithAnnotations.Type.ContainsPointerOrFunctionPointer())
3902
if (argument.
HasAnyErrors
)
4103
if (!size.
HasAnyErrors
)
4238
if (!boundExpression.
HasAnyErrors
)
4319
Debug.Assert(init.
HasAnyErrors
);
4388
if (!result.
HasAnyErrors
)
4455
if (!size.
HasAnyErrors
&& knownSizes[i] == null)
4467
hasErrors = hasErrors || initializer.
HasAnyErrors
;
4689
if (!sizeOpt.
HasAnyErrors
)
4723
if (expression.
HasAnyErrors
)
4742
if (expression.
HasAnyErrors
)
5874
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
5879
if (boundMember.
HasAnyErrors
)
5897
hasErrors = boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
6101
Debug.Assert(boundMember.
HasAnyErrors
);
6119
if (!boundMemberInitializer.
HasAnyErrors
)
6516
hasErrors: dynamicInvocation.
HasAnyErrors
);
6542
boundCall.
HasAnyErrors
)
7780
if (!boundLeft.
HasAnyErrors
)
7974
if (!expr.
HasAnyErrors
)
8199
if (boundLeft.
HasAnyErrors
&& boundLeft.Kind != BoundKind.TypeOrValueExpression)
9349
if (analyzedArguments.HasErrors || expr.
HasAnyErrors
)
9603
if (!expr.
HasAnyErrors
)
9694
if (rank == 1 && !index.
HasAnyErrors
)
11335
if (receiver.
HasAnyErrors
|| access.
HasAnyErrors
)
11501
if (receiver.
HasAnyErrors
)
Binder\Binder_Initializers.cs (1)
251
if (isLast && !statement.
HasAnyErrors
)
Binder\Binder_Invocation.cs (8)
284
else if ((object)argument.Type == null && !argument.
HasAnyErrors
)
384
if (!boundExpression.
HasAnyErrors
)
738
anyApplicableCandidates = !extensionMemberInvocation.
HasAnyErrors
;
744
if (!methodGroup.
HasAnyErrors
) diagnostics.AddRange(resolution.Diagnostics); // Suppress cascading.
1068
if (!call.
HasAnyErrors
&& call.ReceiverOpt != null && (object)call.ReceiverOpt.Type != null && !call.Method.GetIsNewExtensionMember())
1090
if (!dynInvoke.
HasAnyErrors
&&
2314
bool syntaxIsOk = CheckSyntaxForNameofArgument(argument, out string name, boundArgument.
HasAnyErrors
? BindingDiagnosticBag.Discarded : diagnostics);
2317
if (!boundArgument.
HasAnyErrors
&& syntaxIsOk)
Binder\Binder_Operators.cs (23)
49
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
912
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
1402
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
2641
if (left.
HasAnyErrors
|| right.
HasAnyErrors
)
3125
if (operand.
HasAnyErrors
)
3905
hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
3942
bool hasErrors = operand.
HasAnyErrors
; // This would propagate automatically, but by reading it explicitly we can reduce cascading.
4279
if (operand.
HasAnyErrors
)
4590
if (!operand.
HasAnyErrors
)
4601
if (!operand.
HasAnyErrors
)
4614
return operand.
HasAnyErrors
;
5138
if (!operand.
HasAnyErrors
)
5155
if (operand.
HasAnyErrors
|| targetTypeKind == TypeKind.Error)
5414
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
5603
if (leftOperand.
HasAnyErrors
|| rightOperand.
HasAnyErrors
)
5752
hasErrors = trueExpr.
HasAnyErrors
|| falseExpr.
HasAnyErrors
;
Binder\Binder_Patterns.cs (3)
1568
hasErrors |= boundMember.
HasAnyErrors
|| implicitReceiver.
HasAnyErrors
;
1590
Debug.Assert(boundMember.
HasAnyErrors
);
Binder\Binder_Query.cs (11)
206
if (unoptimized.
HasAnyErrors
&& !result.
HasAnyErrors
) unoptimized = null;
287
if (unoptimizedForm.
HasAnyErrors
&& !result.
HasAnyErrors
) unoptimizedForm = null;
739
if (!yExpression.
HasAnyErrors
&& !yExpression.HasExpressionType())
744
else if (!yExpression.
HasAnyErrors
&& yExpression.Type!.IsVoidType())
793
if (unoptimizedForm != null && unoptimizedForm.
HasAnyErrors
&& !expression.
HasAnyErrors
) unoptimizedForm = null;
937
Debug.Assert(ultimateReceiver.Kind != BoundKind.MethodGroup || ultimateReceiver.
HasAnyErrors
);
939
if (ultimateReceiver.
HasAnyErrors
|| node.HasErrors)
982
if (!receiver.
HasAnyErrors
&& !node.HasErrors)
Binder\Binder_Statements.cs (14)
900
if (!expression.
HasAnyErrors
&& !expression.HasExpressionType())
1227
if (initializerOpt?.
HasAnyErrors
!= false)
1483
bool hasErrors = op1.
HasAnyErrors
|| op2.
HasAnyErrors
;
1552
if (!op1.
HasAnyErrors
)
1971
if (expression.
HasAnyErrors
&& expression.Kind != BoundKind.UnboundLambda)
2479
Debug.Assert(operand.
HasAnyErrors
&& operand.Kind != BoundKind.UnboundLambda, "Missing a case in implicit conversion error reporting");
2681
if (expr.
HasAnyErrors
)
3197
if (!argument.
HasAnyErrors
|| argument.Kind == BoundKind.UnboundLambda)
3316
hasError |= boundFilter.
HasAnyErrors
;
3747
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3815
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
3832
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
4200
patternMethodCall.
HasAnyErrors
)
Binder\DecisionDagBuilder.cs (2)
572
RoslynDebug.Assert(recursive.
HasAnyErrors
);
587
Debug.Assert(recursive.
HasAnyErrors
);
Binder\ForEachLoopBinder.cs (1)
952
Debug.Assert(collectionExpr.
HasAnyErrors
); // should already have been reported
Binder\RefSafetyAnalysis.cs (1)
1223
MethodInvocationInfo.FromInlineArrayConversion(equivalentSignatureMethod, arguments, refKinds, node.
HasAnyErrors
),
Binder\Semantics\OverloadResolution\AnalyzedArguments.cs (1)
119
if (argument.
HasAnyErrors
)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1161
if (argument.
HasAnyErrors
)
Binder\SwitchBinder.cs (2)
440
if (!switchGoverningExpression.
HasAnyErrors
)
503
hasErrors = hasErrors || gotoCaseExpressionOpt.
HasAnyErrors
;
Compilation\CSharpSemanticModel.cs (2)
4367
else if (memberGroup.Length == 1 && !boundNode.
HasAnyErrors
)
4455
else if (propertyGroup.Length == 1 && !boundNode.
HasAnyErrors
)
Compilation\MemberSemanticModel.cs (2)
954
Debug.Assert(enumeratorInfoOpt != null || boundForEach.
HasAnyErrors
);
1026
Debug.Assert(boundDeconstruction != null || boundForEach.
HasAnyErrors
);
Compiler\MethodCompiler.cs (4)
1046
processedInitializers.HasErrors = processedInitializers.HasErrors || analyzedInitializers.
HasAnyErrors
;
1324
hasErrors = lowered.
HasAnyErrors
|| diagsForCurrentMethod.HasAnyErrors();
2483
Debug.Assert(initializerInvocation.
HasAnyErrors
|| constructorInitializer.IsConstructorInitializer(), "Please keep this bound node in sync with BoundNodeExtensions.IsConstructorInitializer.");
2494
if (ctorCall != null && !ctorCall.
HasAnyErrors
&& ctorCall.Method != method && TypeSymbol.Equals(ctorCall.Method.ContainingType, method.ContainingType, TypeCompareKind.ConsiderEverything2))
FlowAnalysis\AbstractFlowPass.cs (2)
2204
Debug.Assert(node.
HasAnyErrors
|| (object)readMethod != (object)GetWriteMethod(property));
2841
Debug.Assert(node.
HasAnyErrors
|| (object)readMethod != (object)writeMethod);
FlowAnalysis\DefiniteAssignment.cs (1)
903
if (value == null || value.
HasAnyErrors
) return true;
FlowAnalysis\NullableWalker.cs (1)
3721
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 (1)
505
Debug.Assert(arg.
HasAnyErrors
|| arg.Type.SpecialType == SpecialType.System_String);
Symbols\ConstantValueUtils.cs (1)
87
if (!boundValue.
HasAnyErrors
)
Symbols\Source\ParameterHelpers.cs (1)
964
else if (!defaultExpression.
HasAnyErrors
&&