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)
2012localSymbol.Name,
2101Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUse, node, parameter.Name);
2110Error(diagnostics, ErrorCode.ERR_AnonDelegateCantUseRefLike, node, parameter.Name);
2124Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRef, node, parameter.Name);
2133Error(diagnostics, ErrorCode.ERR_UnsupportedPrimaryConstructorParameterCapturingRefLike, node, parameter.Name);
3823parameter.Name,
3824correspondingParameter.Name);
3842parameter.Name,
3843correspondingParameter.Name);
6137if (!requiredMembersBuilder.TryGetValue(memberSymbol.Name, out var requiredMember))
6147requiredMembersBuilder.Remove(memberSymbol.Name);
7473if (leftType.Name == leftName || IsUsingAliasInScope(leftName))
7508return (type.Name == name || IsUsingAliasInScope(name)) &&
9807var name = candidate.IsIndexer ? SyntaxFacts.GetText(SyntaxKind.ThisKeyword) : candidate.Name;
10119syntax, typeArgumentsOpt: default, method.Name, ImmutableArray.Create(method),
10123indexerOrSliceAccess = BindMethodGroupInvocation(syntax, syntax, method.Name, boundMethodGroup, analyzedArguments,
10219return 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\NullableWalker.cs (17)
757if ((symbol.IsRequired() || membersWithStateEnforcedByRequiredMembers.Contains(symbol.Name)) && constructor.ShouldCheckRequiredMembers())
790var info = new CSDiagnosticInfo(errorCode, new object[] { symbol.Kind.Localize(), symbol.Name }, ImmutableArray<Symbol>.Empty, additionalLocations: symbol.Locations);
1055Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1124Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1283Diagnostics.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1310Diagnostics.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1361if (inputParamNames.Contains(inputParam.Name)
1369Diagnostics.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1374Diagnostics.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
4909if ((leftType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[0].Name)) ||
4910(rightType.IsNotNull && methodOpt.ReturnNotNullIfParameterNotNull.Contains(methodOpt.Parameters[1].Name)))
6376|| (method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__Equals).Name
6377&& method.Name != SpecialMembers.GetDescriptor(SpecialMember.System_Object__ReferenceEquals).Name
6968if (returnNotNullIfParameterNotNull?.Contains(parameter.Name) == true)
9479var returnNotNull = operandState.IsNotNull() && method.ReturnNotNullIfParameterNotNull.Contains(parameter.Name);
12680var name = id.Symbol.Name;
Lowering\SynthesizedMethodBaseSymbol.cs (1)
142p.Name,
Symbols\Source\SourceMemberContainerSymbol.cs (20)
1270return (IsTupleType || IsRecord || IsRecordStruct) ? GetMembers().Select(m => m.Name) : this.declaration.MemberNames;
1383if (member.Name == this.Name)
1609{ symbol.Name.AsMemory(), ImmutableArray.Create(symbol) },
1626ImmutableArrayExtensions.AddToMultiValueDictionaryBuilder(accumulator, item.Name.AsMemory(), item);
2045diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, symbol.GetFirstLocation(), this, symbol.Name);
2170(method1.IsConstructor() ? this.Name : method1.Name);
2184typeParameterNames.Add(typeParameter.Name);
2300foreach (var dup in GetMembers(tp.Name))
2302diagnostics.Add(ErrorCode.ERR_DuplicateNameInClass, dup.GetFirstLocation(), this, tp.Name);
3475if (member.Name == name)
3857accessorName = accessor.Name;
3861string propertyName = propertySymbol.IsIndexer ? propertySymbol.MetadataName : propertySymbol.Name;
3901string accessorName = SourceEventSymbol.GetAccessorName(eventSymbol.Name, isAdder);
4205memberNames.Add(member.Name);
4212case FieldSymbol { Name: var fieldName }:
4537var targetProperty = new SignatureOnlyPropertySymbol(param.Name,
4546&& !fieldsByName.TryGetValue(param.Name, out existingMember))
4588param.Name);
4612if (memberNames.Contains(symbol.Name) || this.GetTypeMembersDictionary().ContainsKey(symbol.Name.AsMemory()))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (6)
580return !definition.Parameters.SequenceEqual(implementation.Parameters, (a, b) => a.Name == b.Name) ||
581!definition.TypeParameters.SequenceEqual(implementation.TypeParameters, (a, b) => a.Name == b.Name);
611diagnostics.Add(ErrorCode.ERR_PartialMethodInconsistentConstraints, implementation.GetFirstLocation(), implementation, typeParameter2.Name);
615diagnostics.Add(ErrorCode.WRN_NullabilityMismatchInConstraintsOnPartialImplementation, implementation.GetFirstLocation(), implementation, typeParameter2.Name);
Symbols\TypeSymbol.cs (7)
1600correspondingImplementingAccessor.Name,
1724foreach (Symbol member in implicitImpl.ContainingType.GetMembers(implicitImpl.Name))
2117diagnostics.Add(ErrorCode.ERR_ImplBadConstraints, GetImplicitImplementationDiagnosticLocation(interfaceMethod, implementingType, implicitImpl), typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2122typeParameter2.Name, implicitImpl, typeParameter1.Name, interfaceMethod);
2176foreach (Symbol member in currType.GetMembers(interfaceMember.Name))
Symbols\TypeSymbolExtensions.cs (16)
560if ((object)symbol == null || symbol.Name != names[i]) return false;
1374ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true },
1387ContainingNamespace: { Name: nameof(System), ContainingNamespace.IsGlobalNamespace: true },
1395ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1406ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1417ContainingNamespace: { Name: "System", ContainingNamespace: { IsGlobalNamespace: true } },
1725if (name == tpEnclosing.Name)
1758if (typeParameter.Name == name)
1824var name = @namespace.Name;
2142if (typeSymbol.Name != name || typeSymbol.ContainingType is object)
2152if (typeSymbol.Name != name)
2164=> type.Name == "SetsRequiredMembersAttribute" && type.IsWellKnownDiagnosticsCodeAnalysisTopLevelType();
2183if (innerNamespace?.Name != innerNS)
2194if (midNamespace?.Name != midNS)
2200if (outerNamespace?.Name != outerNS)
2267switch (GeneratedNameParser.GetKind(type.Name))