5 overrides of IsConst
Microsoft.CodeAnalysis.CSharp (5)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
90public override bool IsConst
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
474public override bool IsConst
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
54public sealed override bool IsConst
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
115public override bool IsConst
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
155public override bool IsConst
19 references to IsConst
Microsoft.CodeAnalysis.CSharp (19)
Binder\Binder.ValueChecks.cs (1)
5857if (field.IsConst)
Binder\Binder_AnonymousTypes.cs (1)
197return !((FieldSymbol)member).IsConst;
Binder\Binder_Attributes.cs (1)
632invalidNamedArgument |= fieldSymbol.IsConst;
Binder\Binder_Expressions.cs (1)
8579if (fieldSymbol.IsConst && !IsInsideNameof)
Binder\Binder_Initializers.cs (1)
187if ((object)fieldSymbol != null && fieldSymbol.IsConst)
Binder\PatternExplainer.cs (1)
653if (declaredMember is FieldSymbol { IsConst: true, IsStatic: true, DeclaredAccessibility: Accessibility.Public } field &&
CodeGen\EmitExpression.cs (1)
1139Debug.Assert(!field.IsConst || field.ContainingType.SpecialType == SpecialType.System_Decimal,
Compiler\MethodCompiler.cs (1)
559if (fieldSymbol.IsConst)
Emitter\Model\FieldSymbolAdapter.cs (1)
204return AdaptedFieldSymbol.IsReadOnly || (AdaptedFieldSymbol.IsConst && !AdaptedFieldSymbol.IsMetadataConstant);
FlowAnalysis\NullableWalker.cs (2)
747if (field?.IsConst ?? false) 818case FieldSymbol { IsConst: true }:
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (1)
173if (!((FieldSymbol)symbol).IsConst)
Symbols\FieldSymbol.cs (3)
142get { return this.IsConst && (this.Type.SpecialType != SpecialType.System_Decimal); } 153if (!IsConst) 171if (!IsConst)
Symbols\PublicModel\FieldSymbol.cs (1)
82bool IFieldSymbol.IsConst => _underlying.IsConst;
Symbols\Source\SourceMemberContainerSymbol.cs (2)
722if (!member.IsFieldOrFieldLikeEvent(out field) || field.IsConst || field.IsFixedSizeBuffer) 4860return initializers.Any(static siblings => siblings.Any(static initializer => !initializer.FieldOpt.IsConst));
Symbols\Wrapped\WrappedFieldSymbol.cs (1)
159return _underlyingField.IsConst;