Binder\Binder_Expressions.cs (11)
437FieldSymbol field,
2006FieldSymbol possibleField = null;
2020possibleField = lookupResult.SingleSymbolOrDefault as FieldSymbol;
2092(this.ContainingMember() is FieldSymbol || (object)primaryCtor == this.ContainingMember()) ||
2180return BindFieldAccess(node, receiver, (FieldSymbol)symbol, diagnostics, resultKind, indexed, hasErrors: isError);
5872var fieldSymbol = ((BoundFieldAccess)boundMember).FieldSymbol;
8175resultType = ((FieldSymbol)symbolOpt).GetFieldType(this.FieldsBeingBound).Type;
8327result = BindFieldAccess(node, left, (FieldSymbol)symbol, diagnostics, lookupResult.Kind, indexed, hasErrors: wasError);
8516FieldSymbol fieldSymbol,
9023expr.Type.HasInlineArrayAttribute(out int length) && expr.Type.TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField)
9092BoundExpression bindInlineArrayElementAccess(ExpressionSyntax node, BoundExpression expr, int length, AnalyzedArguments analyzedArguments, BoundExpression convertedIndex, WellKnownType indexOrRangeWellknownType, FieldSymbol elementField, BindingDiagnosticBag diagnostics)
FlowAnalysis\NullableWalker.cs (17)
721FieldSymbol? field;
725case FieldSymbol f:
815case FieldSymbol { OriginalDefinition: SynthesizedPrimaryConstructorParameterBackingFieldSymbol }:
818case FieldSymbol { IsConst: true }:
820case FieldSymbol { AssociatedSymbol: SourcePropertySymbolBase { UsesFieldKeyword: false } prop }:
953if (requiredMember is FieldSymbol)
1949var fieldSymbol = fieldAccess.FieldSymbol;
2126primaryConstructor.GetCapturedParameters().TryGetValue(parameter, out FieldSymbol? field))
2602foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(targetType))
3603(FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var oi } originalField, FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var ui } updatedField) =>
8486tupleType.GetMembers(NamedTypeSymbol.ValueTupleRestFieldName).FirstOrDefault() is FieldSymbol restField)
8493void trackState(BoundExpression value, FieldSymbol field, TypeWithState valueType)
8551void trackConvertedValue(FieldSymbol targetField, Conversion conversion, FieldSymbol valueField)
10046private static FlowAnalysisAnnotations GetFieldAnnotations(FieldSymbol field)
10062var annotations = memberSymbol switch { PropertySymbol prop => prop.GetFlowAnalysisAnnotations(), FieldSymbol field => GetFieldAnnotations(field), _ => FlowAnalysisAnnotations.None };
Generated\BoundNodes.xml.Generated.cs (32)
309public BoundFieldEqualsValue(SyntaxNode syntax, FieldSymbol field, ImmutableArray<LocalSymbol> locals, BoundExpression value, bool hasErrors = false)
320public FieldSymbol Field { get; }
325public BoundFieldEqualsValue Update(FieldSymbol field, ImmutableArray<LocalSymbol> locals, BoundExpression value)
2334public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors)
2345public BoundLocalId(SyntaxNode syntax, LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type)
2358public FieldSymbol? HoistedField { get; }
2363public BoundLocalId Update(LocalSymbol local, FieldSymbol? hoistedField, TypeSymbol type)
2377public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type, bool hasErrors)
2388public BoundParameterId(SyntaxNode syntax, ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
2401public FieldSymbol? HoistedField { get; }
2406public BoundParameterId Update(ParameterSymbol parameter, FieldSymbol? hoistedField, TypeSymbol type)
2751public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type, bool hasErrors)
2762public BoundFieldInfo(SyntaxNode syntax, FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type)
2774public FieldSymbol Field { get; }
2780public BoundFieldInfo Update(FieldSymbol field, MethodSymbol? getFieldFromHandle, TypeSymbol type)
5443public BoundDagFieldEvaluation(SyntaxNode syntax, FieldSymbol field, BoundDagTemp input, bool hasErrors = false)
5453public FieldSymbol Field { get; }
5458public BoundDagFieldEvaluation Update(FieldSymbol field, BoundDagTemp input)
7258public BoundFieldAccess(SyntaxNode syntax, BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type, bool hasErrors = false)
7275public FieldSymbol FieldSymbol { get; }
7284public BoundFieldAccess Update(BoundExpression? receiverOpt, FieldSymbol fieldSymbol, ConstantValue? constantValueOpt, LookupResultKind resultKind, bool isByValue, bool isDeclaration, TypeSymbol type)
7298public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type, bool hasErrors)
7308public BoundHoistedFieldAccess(SyntaxNode syntax, FieldSymbol fieldSymbol, TypeSymbol type)
7319public FieldSymbol FieldSymbol { get; }
7324public BoundHoistedFieldAccess Update(FieldSymbol fieldSymbol, TypeSymbol type)
12231FieldSymbol field = GetUpdatedSymbol(node, node.Field);
13017FieldSymbol? hoistedField = GetUpdatedSymbol(node, node.HoistedField);
13035FieldSymbol? hoistedField = GetUpdatedSymbol(node, node.HoistedField);
13166FieldSymbol field = GetUpdatedSymbol(node, node.Field);
13683FieldSymbol field = GetUpdatedSymbol(node, node.Field);
14415FieldSymbol fieldSymbol = GetUpdatedSymbol(node, node.FieldSymbol);
14433FieldSymbol fieldSymbol = GetUpdatedSymbol(node, node.FieldSymbol);
Symbols\Compilation_WellKnownMembers.cs (13)
245internal static Symbol? GetRuntimeMember(NamedTypeSymbol declaringType, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt)
251internal static Symbol? GetRuntimeMember(ImmutableArray<Symbol> members, in MemberDescriptor descriptor, SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol> comparer, AssemblySymbol? accessWithinOpt)
345if (!comparer.MatchFieldSignature((FieldSymbol)member, descriptor.Signature))
720var ignoreSymbolStoreDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__IgnoreSymbolStoreSequencePoints);
736var defaultDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__Default);
742var disableOptimizationsDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__DisableOptimizations);
754var enableEncDebuggingMode = (FieldSymbol?)GetWellKnownTypeMember(WellKnownMember.System_Diagnostics_DebuggableAttribute_DebuggingModes__EnableEditAndContinue);
1061internal class SpecialMembersSignatureComparer : SignatureComparer<MethodSymbol, FieldSymbol, PropertySymbol, TypeSymbol, ParameterSymbol>
1085protected override TypeSymbol GetFieldType(FieldSymbol field)