16 overrides of RefKind
Microsoft.CodeAnalysis.CSharp (16)
Lowering\ClosureConversion\LambdaCapturedVariable.cs (1)
120
public override RefKind
RefKind
=> RefKind.None;
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (1)
62
public override RefKind
RefKind
=> RefKind.None;
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
35
public override RefKind
RefKind
=> RefKind.None;
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
377
public override RefKind
RefKind
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
73
public override RefKind
RefKind
=> _underlyingField.RefKind;
Symbols\Source\GlobalExpressionVariable.cs (1)
68
public sealed override RefKind
RefKind
=> RefKind.None;
Symbols\Source\SourceEnumConstantSymbol.cs (1)
58
public sealed override RefKind
RefKind
=> RefKind.None;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
421
public sealed override RefKind
RefKind
=> GetTypeAndRefKind(ConsList<FieldSymbol>.Empty).RefKind;
Symbols\SubstitutedFieldSymbol.cs (1)
106
public override RefKind
RefKind
=> _underlyingField.RefKind;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructorParameterBackingFieldSymbol.cs (1)
45
public override RefKind
RefKind
=> RefKind.None;
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
118
public override RefKind
RefKind
=> _property.RefKind;
Symbols\Synthesized\SynthesizedEnumValueFieldSymbol.cs (1)
29
public override RefKind
RefKind
=> RefKind.None;
Symbols\Synthesized\SynthesizedFieldSymbol.cs (1)
36
public override RefKind
RefKind
=> RefKind.None;
Symbols\Synthesized\SynthesizedLambdaCacheFieldSymbol.cs (1)
36
public override RefKind
RefKind
=> RefKind.None;
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
157
public override RefKind
RefKind
=> RefKind.None;
Symbols\Tuples\TupleFieldSymbol.cs (1)
125
public sealed override RefKind
RefKind
=> _underlyingField.RefKind;
50 references to RefKind
Microsoft.CodeAnalysis.CSharp (50)
Binder\Binder.ValueChecks.cs (15)
1161
Debug.Assert(backingField.
RefKind
== RefKind.None);
1166
Debug.Assert(backingField.
RefKind
== RefKind.None);
1353
if ((fieldSymbol.
RefKind
== RefKind.None ? RequiresAssignableVariable(valueKind) : RequiresRefAssignableVariable(valueKind)) &&
1363
switch (fieldSymbol.
RefKind
)
1373
throw ExceptionUtilities.UnexpectedValue(fieldSymbol.
RefKind
);
1388
switch (fieldSymbol.
RefKind
)
1397
throw ExceptionUtilities.UnexpectedValue(fieldSymbol.
RefKind
);
1403
switch (fieldSymbol.
RefKind
)
1412
throw ExceptionUtilities.UnexpectedValue(fieldSymbol.
RefKind
);
1508
if (fieldSymbol.
RefKind
!= RefKind.None)
1532
if (fieldSymbol.
RefKind
!= RefKind.None)
3249
Debug.Assert(field.
RefKind
== RefKind.None ? RequiresAssignableVariable(kind) : RequiresRefAssignableVariable(kind));
5862
if (field.
RefKind
is RefKind.Ref)
5885
if (field.
RefKind
== RefKind.RefReadOnly)
5890
Debug.Assert(field.
RefKind
== RefKind.None);
Binder\Binder_Expressions.cs (3)
451
BoundExpression result = initializerBinder.BindVariableOrAutoPropInitializerValue(initializerOpt, field.
RefKind
,
454
if (field is { IsStatic: false,
RefKind
: RefKind.None, ContainingSymbol: SourceMemberContainerTypeSymbol { PrimaryConstructor: { } primaryConstructor } } &&
8605
fieldSymbol.
RefKind
!= RefKind.None)
BoundTree\BoundExpressionExtensions.cs (2)
31
return ((BoundFieldAccess)node).FieldSymbol.
RefKind
;
70
FieldSymbol f => f.
RefKind
,
BoundTree\Constructors.cs (1)
63
fieldSymbol.
RefKind
!= RefKind.None ||
CodeGen\EmitAddress.cs (2)
556
field.
RefKind
== RefKind.None ?
560
_builder.EmitOpCode(field.
RefKind
== RefKind.None ? ILOpCode.Ldflda : ILOpCode.Ldfld);
CodeGen\EmitExpression.cs (6)
737
Debug.Assert(argument.Type.IsDynamic() || argument is BoundFieldAccess { FieldSymbol.
RefKind
: not RefKind.None }, "passing args byref should not clone them into temps");
1132
if (!field.IsVolatile && !field.IsStatic && fieldAccess.ReceiverOpt.Type.IsVerifierValue() && field.
RefKind
== RefKind.None)
1144
if (field.
RefKind
!= RefKind.None)
1301
if (field.IsStatic || field.
RefKind
!= RefKind.None)
2782
if (left.FieldSymbol.
RefKind
!= RefKind.None &&
3282
if (field.
RefKind
!= RefKind.None && !refAssign)
CodeGen\EmitStatement.cs (1)
1159
Debug.Assert(left.FieldSymbol.
RefKind
== RefKind.None);
Emitter\Model\FieldSymbolAdapter.cs (1)
56
bool Cci.IFieldReference.IsByReference => AdaptedFieldSymbol.
RefKind
!= RefKind.None;
Emitter\Model\SpecializedFieldReference.cs (1)
80
bool Cci.IFieldReference.IsByReference => _underlyingField.
RefKind
!= RefKind.None;
FlowAnalysis\DefiniteAssignment.cs (5)
859
write: field.
RefKind
== RefKind.None || isRef);
971
write: field.
RefKind
== RefKind.None || isRef);
1334
if (fieldSymbol.
RefKind
!= RefKind.None)
1518
if (!isRef && node is BoundFieldAccess { FieldSymbol.
RefKind
: not RefKind.None } fieldAccess)
1640
write: field.
RefKind
== RefKind.None || isRef);
FlowAnalysis\FlowAnalysisPass.cs (1)
138
if (field.
RefKind
== RefKind.None)
Lowering\InitializerRewriter.cs (1)
106
isRef: field.
RefKind
!= RefKind.None)
Symbols\BaseTypeAnalysis.cs (1)
180
if (field.
RefKind
!= RefKind.None)
Symbols\FieldSymbol.cs (1)
356
if (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)
34
RefKind IFieldSymbol.RefKind => _underlying.
RefKind
;
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
73
public override RefKind RefKind => _underlyingField.
RefKind
;
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
392
if (this.
RefKind
== RefKind.RefReadOnly)
Symbols\Source\SourceAssemblySymbol.cs (1)
2743
else if (field.
RefKind
!= RefKind.None)
Symbols\Source\SourceFieldSymbol.cs (1)
139
if (
RefKind
== RefKind.RefReadOnly)
Symbols\SubstitutedFieldSymbol.cs (1)
106
public override RefKind RefKind => _underlyingField.
RefKind
;
Symbols\Tuples\TupleFieldSymbol.cs (1)
125
public sealed override RefKind RefKind => _underlyingField.
RefKind
;
Symbols\TypeSymbol.cs (1)
2554
return elementField is {
RefKind
: RefKind.None, IsFixedSizeBuffer: false };