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)
522Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
541Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
693diagnostics.Add(ErrorCode.ERR_LocalCantBeFixedAndHoisted, location, captured.Name);
1227string symbolName = symbol.Name;
1310var symbolName = hasAssociatedProperty ? associatedSymbol.Name : fieldSymbol.Name;
1965parameter.GetFirstLocationOrNone(), parameter.Name);
2337if (symbol.DeclarationKind != LocalDeclarationKind.PatternVariable && !string.IsNullOrEmpty(symbol.Name)) // avoid diagnostics for parser-inserted names
2339Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
2356if (!string.IsNullOrEmpty(symbol.Name)) // avoid diagnostics for parser-inserted names
2358Diagnostics.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
2860string.IsNullOrEmpty(id.Symbol.Name) ? "<anon>" + id.Symbol.GetHashCode() :
2861id.Symbol.Name);
FlowAnalysis\NullableWalker.cs (17)
770if ((symbol.IsRequired() || membersWithStateEnforcedByRequiredMembers.Contains(symbol.Name)) && constructor.ShouldCheckRequiredMembers())
803var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.Kind.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
1068Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1137Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1309Diagnostics.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1336Diagnostics.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1387if (inputParamNames.Contains(inputParam.Name)
1395Diagnostics.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1400Diagnostics.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
5011if ((leftType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[0].Name)) ||
5012(rightType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[1].Name)))
6580|| (method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__Equals).Name
6581&& method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__ReferenceEquals).Name
7181if (returnNotNullIfParameterNotNull?.Contains(parameter.Name) == true)
9713var returnNotNull = operandState.IsNotNull() && method.ReturnNotNullIfParameterNotNull.Contains(parameter.Name);
12977var 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);
922else if (ContainingType is { IsExtension: true, ExtensionParameter.Name: "" } && !IsStatic)
Symbols\TypeSymbol.cs (7)
1616correspondingImplementingAccessor.Name,
1740foreach (Symbol member in implicitImpl.ContainingType.GetMembers(implicitImpl.Name))
2138diagnostics.Add(ErrorCode.ERR_ImplBadConstraints, GetImplicitImplementationDiagnosticLocation(interfaceMethod, implementingType, implicitImpl), typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2143typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2197foreach (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))