7 overrides of GetConstantValue
Microsoft.CodeAnalysis.CSharp (6)
CodeGen\Optimizer.cs (1)
2283internal override ConstantValue GetConstantValue(SyntaxNode node, LocalSymbol inProgress, BindingDiagnosticBag diagnostics)
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
61internal override ConstantValue GetConstantValue(SyntaxNode node, LocalSymbol inProgress, BindingDiagnosticBag diagnostics = null) => null;
Symbols\Source\SourceLocalSymbol.cs (1)
471internal override ConstantValue GetConstantValue(SyntaxNode node, LocalSymbol inProgress, BindingDiagnosticBag diagnostics)
Symbols\Synthesized\SynthesizedLocal.cs (1)
187internal sealed override ConstantValue GetConstantValue(SyntaxNode node, LocalSymbol inProgress, BindingDiagnosticBag diagnostics)
Symbols\Synthesized\TypeSubstitutedLocalSymbol.cs (1)
113internal override ConstantValue GetConstantValue(SyntaxNode node, LocalSymbol inProgress, BindingDiagnosticBag diagnostics)
Symbols\UpdatedContainingSymbolLocal.cs (1)
93internal override ConstantValue GetConstantValue(SyntaxNode node, LocalSymbol inProgress, BindingDiagnosticBag? diagnostics = null) =>
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
Symbols\EELocalSymbolBase.cs (1)
36internal override ConstantValue GetConstantValue(SyntaxNode node, LocalSymbol inProgress, BindingDiagnosticBag diagnostics)
5 references to GetConstantValue
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder_Expressions.cs (1)
1907? localSymbol.GetConstantValue(node, this.LocalInProgress, diagnostics) : null;
Symbols\LocalSymbol.cs (2)
323ConstantValue constantValue = this.GetConstantValue(null, null, null); 341ConstantValue constantValue = this.GetConstantValue(null, null, null);
Symbols\Synthesized\TypeSubstitutedLocalSymbol.cs (1)
115return _originalVariable.GetConstantValue(node, inProgress, diagnostics);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
CompilationContext.cs (1)
632var expression = new BoundLocal(syntax, local, constantValueOpt: local.GetConstantValue(null, null, new BindingDiagnosticBag(diagnostics)), type: local.Type);