19 references to IsConst
Microsoft.CodeAnalysis.CSharp (18)
Binder\Binder_Expressions.cs (1)
1906var constantValueOpt = localSymbol.IsConst && !IsInsideNameof && !type.IsErrorType()
CodeGen\EmitStatement.cs (2)
778if (!local.IsConst && !IsStackLocal(local)) 1742if (local.IsConst)
FlowAnalysis\DefiniteAssignment.cs (2)
1161if (symbol is LocalSymbol local && local.IsConst) 2142symbol.IsConst ||
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
600if (symbol is LocalSymbol local && local.IsConst)
Lowering\LocalRewriter\LocalRewriter_LocalDeclaration.cs (2)
34if (localSymbol.IsConst) 76if (this.Instrument && originalOpt?.WasCompilerGenerated == false && !localSymbol.IsConst &&
Lowering\StateMachineRewriter\IteratorAndAsyncCaptureWalker.cs (2)
126LocalSymbol { IsConst: false, IsPinned: false, IsRef: false } local => 145if (!((LocalSymbol)symbol).IsConst)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (1)
164if (local.IsConst)
Symbols\LocalSymbol.cs (3)
55internal virtual bool CanScheduleToStack => !IsConst && !IsPinned; 318if (!this.IsConst) 336if (!this.IsConst)
Symbols\PublicModel\LocalSymbol.cs (1)
48bool ILocalSymbol.IsConst => _underlying.IsConst;
Symbols\Source\SourceLocalSymbol.cs (2)
559if (this.IsConst && _constantTuple == null) 579if (this.IsConst && inProgress == this)
Symbols\Symbol.cs (1)
1570if (((LocalSymbol)variable).IsConst)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
CompilationContext.cs (1)
1235return local.IsConst