Binder\Binder_Attributes.cs (5)
405Error(diagnostics, ErrorCode.ERR_BadAttributeParamType, syntax, parameter.Name, paramType.Type);
664namedArgumentNameSymbol.Name));
677namedArgumentNameSymbol.Name));
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));
Binder\Binder_Expressions.cs (17)
2049localSymbol.Name,
2146Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUse, node, parameter.Name);
2155Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseRefLike, node, parameter.Name);
2169Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef, node, parameter.Name);
2178Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike, node, parameter.Name);
3803parameter.Name,
3804correspondingParameter.Name);
3822parameter.Name,
3823correspondingParameter.Name);
6188if (!requiredMembersBuilder.TryGetValue(memberSymbol.Name, out var requiredMember))
6198requiredMembersBuilder.Remove(memberSymbol.Name);
7524if (leftType.Name == leftName || IsUsingAliasInScope(leftName))
7559return (type.Name == name || IsUsingAliasInScope(name)) &&
10185var name = candidate.IsIndexer ? SyntaxFacts.GetText(SyntaxKind.ThisKeyword) : candidate.Name;
10497syntax, typeArgumentsOpt: default, method.Name, ImmutableArray.Create(method),
10501indexerOrSliceAccess = BindMethodGroupInvocation(syntax, syntax, method.Name, boundMethodGroup, analyzedArguments,
10599return new ErrorPropertySymbol(candidate.ContainingType, propertyType, candidate.Name, candidate.IsIndexer, candidate.IsIndexedProperty);
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (7)
521Debug.Assert(firstSupported.Member is MethodSymbol { Name: "Add" });
662diagnostics.Add(ErrorCode.ERR_QueryNoProvider, location, receiverOpt.Type, symbol.Name);
668else if (nodeOpt?.Kind() == SyntaxKind.AwaitExpression && symbol.Name == WellKnownMemberNames.GetAwaiter)
751Binder.ReportQueryInferenceFailed(queryClause, inferenceFailed.Member.Name, receiver, arguments, symbols, diagnostics);
773binder.ReportQueryLookupFailed(queryClause, instanceArgument, inferenceFailed.Member.Name, symbols, diagnostics);
779new object[] { instanceArgument.Type, inferenceFailed.Member.Name },
909badParamName = parameters[badParamIndex].Name;
FlowAnalysis\DefiniteAssignment.cs (13)
537Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
556Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
708diagnostics.Add(ErrorCode.ERR_LocalCantBeFixedAndHoisted, location, captured.Name);
1242string symbolName = symbol.Name;
1325var symbolName = hasAssociatedProperty ? associatedSymbol.Name : fieldSymbol.Name;
1980parameter.GetFirstLocationOrNone(), parameter.Name);
2352if (symbol.DeclarationKind != LocalDeclarationKind.PatternVariable && !string.IsNullOrEmpty(symbol.Name)) // avoid diagnostics for parser-inserted names
2354Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
2371if (!string.IsNullOrEmpty(symbol.Name)) // avoid diagnostics for parser-inserted names
2373Diagnostics.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
2875string.IsNullOrEmpty(id.Symbol.Name) ? "<anon>" + id.Symbol.GetHashCode() :
2876id.Symbol.Name);
FlowAnalysis\NullableWalker.cs (17)
766if ((symbol.IsRequired() || membersWithStateEnforcedByRequiredMembers.Contains(symbol.Name)) && constructor.ShouldCheckRequiredMembers())
799var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.Kind.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
1064Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1133Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1294Diagnostics.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1321Diagnostics.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1372if (inputParamNames.Contains(inputParam.Name)
1380Diagnostics.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1385Diagnostics.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
4995if ((leftType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[0].Name)) ||
4996(rightType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[1].Name)))
6464|| (method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__Equals).Name
6465&& method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__ReferenceEquals).Name
7062if (returnNotNullIfParameterNotNull?.Contains(parameter.Name) == true)
9583var returnNotNull = operandState.IsNotNull() && method.ReturnNotNullIfParameterNotNull.Contains(parameter.Name);
12800var name = id.Symbol.Name;
Lowering\SynthesizedMethodBaseSymbol.cs (1)
126p.Name,
Symbols\Source\SourceOrdinaryMethodSymbol.cs (7)
585return !definition.Parameters.SequenceEqual(implementation.Parameters, (a, b) => a.Name == b.Name) ||
586!definition.TypeParameters.SequenceEqual(implementation.TypeParameters, (a, b) => a.Name == b.Name);
616diagnostics.Add(ErrorCode.ERR_PartialMethodInconsistentConstraints, implementation.GetFirstLocation(), implementation, typeParameter2.Name);
620diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation, implementation.GetFirstLocation(), implementation, typeParameter2.Name);
921else if (ContainingType is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic)
Symbols\TypeSymbol.cs (7)
1610correspondingImplementingAccessor.Name,
1734foreach (Symbol member in implicitImpl.ContainingType.GetMembers(implicitImpl.Name))
2127diagnostics.Add(ErrorCode.ERR_ImplBadConstraints, GetImplicitImplementationDiagnosticLocation(interfaceMethod, implementingType, implicitImpl), typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2132typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2186foreach (Symbol member in currType.GetMembers(interfaceMember.Name))
Symbols\TypeSymbolExtensions.cs (16)
560if ((object)symbol == null || symbol.Name != names[i]) return false;
1375ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true },
1388ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true },
1396ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1407ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1418ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1723if (name == tpEnclosing.Name)
1758if (typeParameter.Name == name)
1824var name = @namespace.Name;
2153if (typeSymbol.Name != name || typeSymbol.ContainingType is object)
2163if (typeSymbol.Name != name)
2175=> type.Name == "SetsRequiredMembersAttribute" && type.IsWellKnownDiagnosticsCodeAnalysisTopLevelType();
2194if (innerNamespace?.Name != innerNS)
2205if (midNamespace?.Name != midNS)
2211if (outerNamespace?.Name != outerNS)
2278switch (GeneratedNameParser.GetKind(type.Name))