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;
8173resultType = ((FieldSymbol)symbolOpt).GetFieldType(this.FieldsBeingBound).Type;
8325result = BindFieldAccess(node, left, (FieldSymbol)symbol, diagnostics, lookupResult.Kind, indexed, hasErrors: wasError);
8514FieldSymbol fieldSymbol,
9021expr.Type.HasInlineArrayAttribute(out int length) && expr.Type.TryGetPossiblyUnsupportedByLanguageInlineArrayElementField() is FieldSymbol elementField)
9090BoundExpression bindInlineArrayElementAccess(ExpressionSyntax node, BoundExpression expr, int length, AnalyzedArguments analyzedArguments, BoundExpression convertedIndex, WellKnownType indexOrRangeWellknownType, FieldSymbol elementField, BindingDiagnosticBag diagnostics)
FlowAnalysis\NullableWalker.cs (18)
722FieldSymbol? field;
726case FieldSymbol f:
816case FieldSymbol { OriginalDefinition: SynthesizedPrimaryConstructorParameterBackingFieldSymbol }:
819case FieldSymbol { IsConst: true }:
821case FieldSymbol { AssociatedSymbol: SourcePropertySymbolBase { UsesFieldKeyword: false } prop }:
926var prop = symbolToInitialize as PropertySymbol ?? (symbolToInitialize as FieldSymbol)?.AssociatedSymbol as PropertySymbol;
982if (requiredMember is FieldSymbol)
2010var fieldSymbol = fieldAccess.FieldSymbol;
2187primaryConstructor.GetCapturedParameters().TryGetValue(parameter, out FieldSymbol? field))
2663foreach (var field in _emptyStructTypeCache.GetStructInstanceFields(targetType))
3664(FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var oi } originalField, FieldSymbol { ContainingType: { IsTupleType: true }, TupleElementIndex: var ui } updatedField) =>
8547tupleType.GetMembers(NamedTypeSymbol.ValueTupleRestFieldName).FirstOrDefault() is FieldSymbol restField)
8554void trackState(BoundExpression value, FieldSymbol field, TypeWithState valueType)
8612void trackConvertedValue(FieldSymbol targetField, Conversion conversion, FieldSymbol valueField)
10107private static FlowAnalysisAnnotations GetFieldAnnotations(FieldSymbol field)
10123var 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)
12267FieldSymbol field = GetUpdatedSymbol(node, node.Field);
13053FieldSymbol? hoistedField = GetUpdatedSymbol(node, node.HoistedField);
13071FieldSymbol? hoistedField = GetUpdatedSymbol(node, node.HoistedField);
13202FieldSymbol field = GetUpdatedSymbol(node, node.Field);
13719FieldSymbol field = GetUpdatedSymbol(node, node.Field);
14451FieldSymbol fieldSymbol = GetUpdatedSymbol(node, node.FieldSymbol);
14469FieldSymbol 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)