16 overrides of RefKind
Microsoft.CodeAnalysis.CSharp (16)
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
120public override RefKind RefKind => RefKind.None;
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (1)
62public override RefKind RefKind => RefKind.None;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
35public override RefKind RefKind => RefKind.None;
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
377public override RefKind RefKind
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
73public override RefKind RefKind => _underlyingField.RefKind;
Symbols\Source\GlobalExpressionVariable.cs (1)
68public sealed override RefKind RefKind => RefKind.None;
Symbols\Source\SourceEnumConstantSymbol.cs (1)
58public sealed override RefKind RefKind => RefKind.None;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
421public sealed override RefKind RefKind => GetTypeAndRefKind(ConsList<FieldSymbol>.Empty).RefKind;
Symbols\SubstitutedFieldSymbol.cs (1)
106public override RefKind RefKind => _underlyingField.RefKind;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
45public override RefKind RefKind => RefKind.None;
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
118public override RefKind RefKind => _property.RefKind;
Symbols\Synthesized\SynthesizedEnumValueFieldSymbol.cs (1)
29public override RefKind RefKind => RefKind.None;
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
36public override RefKind RefKind => RefKind.None;
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
36public override RefKind RefKind => RefKind.None;
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
157public override RefKind RefKind => RefKind.None;
Symbols\Tuples\TupleFieldSymbol.cs (1)
125public sealed override RefKind RefKind => _underlyingField.RefKind;
50 references to RefKind
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder.ValueChecks.cs (12)
1138Debug.Assert(backingField.RefKind == RefKind.None); 1143Debug.Assert(backingField.RefKind == RefKind.None); 1330if ((fieldSymbol.RefKind == RefKind.None ? RequiresAssignableVariable(valueKind) : RequiresRefAssignableVariable(valueKind)) && 1340switch (fieldSymbol.RefKind) 1350throw ExceptionUtilities.UnexpectedValue(fieldSymbol.RefKind); 1365switch (fieldSymbol.RefKind) 1374throw ExceptionUtilities.UnexpectedValue(fieldSymbol.RefKind); 1380switch (fieldSymbol.RefKind) 1389throw ExceptionUtilities.UnexpectedValue(fieldSymbol.RefKind); 1485if (fieldSymbol.RefKind != RefKind.None) 1509if (fieldSymbol.RefKind != RefKind.None) 3226Debug.Assert(field.RefKind == RefKind.None ? RequiresAssignableVariable(kind) : RequiresRefAssignableVariable(kind));
Binder\Binder_Expressions.cs (3)
451BoundExpression result = initializerBinder.BindVariableOrAutoPropInitializerValue(initializerOpt, field.RefKind, 454if (field is { IsStatic: false, RefKind: RefKind.None, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } && 8608fieldSymbol.RefKind != RefKind.None)
BoundTree\BoundExpressionExtensions.cs (2)
31return ((BoundFieldAccess)node).FieldSymbol.RefKind; 70FieldSymbol f => f.RefKind,
BoundTree\Constructors.cs (1)
63fieldSymbol.RefKind != RefKind.None ||
CodeGen\CodeGenerator_HasHome.cs (3)
188if (field.RefKind is RefKind.Ref) 211if (field.RefKind == RefKind.RefReadOnly) 216Debug.Assert(field.RefKind == RefKind.None);
CodeGen\EmitAddress.cs (2)
554field.RefKind == RefKind.None ? 558_builder.EmitOpCode(field.RefKind == RefKind.None ? ILOpCode.Ldflda : ILOpCode.Ldfld);
CodeGen\EmitExpression.cs (6)
737Debug.Assert(argument.Type.IsDynamic() || argument is BoundFieldAccess { FieldSymbol.RefKind: not RefKind.None }, "passing args byref should not clone them into temps"); 1132if (!field.IsVolatile && !field.IsStatic && fieldAccess.ReceiverOpt.Type.IsVerifierValue() && field.RefKind == RefKind.None) 1144if (field.RefKind != RefKind.None) 1301if (field.IsStatic || field.RefKind != RefKind.None) 2782if (left.FieldSymbol.RefKind != RefKind.None && 3282if (field.RefKind != RefKind.None && !refAssign)
CodeGen\EmitStatement.cs (1)
1159Debug.Assert(left.FieldSymbol.RefKind == RefKind.None);
Emitter\Model\FieldSymbolAdapter.cs (1)
56bool Cci.IFieldReference.IsByReference => AdaptedFieldSymbol.RefKind != RefKind.None;
Emitter\Model\SpecializedFieldReference.cs (1)
80bool Cci.IFieldReference.IsByReference => _underlyingField.RefKind != RefKind.None;
FlowAnalysis\DefiniteAssignment.cs (5)
859write: field.RefKind == RefKind.None || isRef); 971write: field.RefKind == RefKind.None || isRef); 1334if (fieldSymbol.RefKind != RefKind.None) 1518if (!isRef && node is BoundFieldAccess { FieldSymbol.RefKind: not RefKind.None } fieldAccess) 1640write: field.RefKind == RefKind.None || isRef);
FlowAnalysis\FlowAnalysisPass.cs (1)
138if (field.RefKind == RefKind.None)
Lowering\InitializerRewriter.cs (1)
106isRef: field.RefKind != RefKind.None)
Symbols\BaseTypeAnalysis.cs (1)
203if (field.RefKind != RefKind.None)
Symbols\FieldSymbol.cs (1)
356if (DeriveUseSiteInfoFromType(ref result, this.TypeWithAnnotations, RefKind == RefKind.None ? AllowedRequiredModifierType.System_Runtime_CompilerServices_Volatile : AllowedRequiredModifierType.None) ||
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (1)
183(field.RefKind != RefKind.None) == fieldInfo.IsByRef &&
Symbols\PublicModel\FieldSymbol.cs (1)
34RefKind IFieldSymbol.RefKind => _underlying.RefKind;
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
73public override RefKind RefKind => _underlyingField.RefKind;
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
392if (this.RefKind == RefKind.RefReadOnly)
Symbols\Source\SourceAssemblySymbol.cs (1)
2743else if (field.RefKind != RefKind.None)
Symbols\Source\SourceFieldSymbol.cs (1)
139if (RefKind == RefKind.RefReadOnly)
Symbols\SubstitutedFieldSymbol.cs (1)
106public override RefKind RefKind => _underlyingField.RefKind;
Symbols\Tuples\TupleFieldSymbol.cs (1)
125public sealed override RefKind RefKind => _underlyingField.RefKind;
Symbols\TypeSymbol.cs (1)
2554return elementField is { RefKind: RefKind.None, IsFixedSizeBuffer: false };