58 references to Null
Microsoft.CodeAnalysis (11)
CodeGen\SwitchIntegralJumpTableEmitter.cs (1)
116
if (sortedCaseLabels[0].Key != ConstantValue.
Null
)
ConstantValue.cs (5)
93
public static ConstantValue Nothing { get { return
Null
; } }
105
return
Null
;
372
case ConstantValueTypeDiscriminator.Null: return
Null
;
430
case ConstantValueTypeDiscriminator.String: return
Null
;
744
return ReferenceEquals(this,
Null
);
MetadataReader\MetadataDecoder.cs (3)
1022
value = (type.IsReferenceType || type.TypeKind == TypeKind.Pointer || type.TypeKind == TypeKind.FunctionPointer) ? ConstantValue.
Null
: ConstantValue.Bad;
1119
return ConstantValue.
Null
;
1132
return ConstantValue.
Null
;
MetadataReader\PEModule.cs (1)
3757
return ConstantValue.
Null
;
Operations\ControlFlowGraphBuilder.cs (1)
3459
? ConstantValue.
Null
Microsoft.CodeAnalysis.CSharp (36)
Binder\Binder_Await.cs (1)
370
var receiver = new BoundLiteral(node, ConstantValue.
Null
, awaiterType);
Binder\Binder_Expressions.cs (3)
7363
cv = ConstantValue.
Null
;
7771
if (boundLeft.Kind == BoundKind.Literal && ((BoundLiteral)boundLeft).ConstantValueOpt == ConstantValue.
Null
)
7944
if ((boundLeft is BoundDefaultLiteral || boundLeft is BoundDefaultExpression) && boundLeft.ConstantValueOpt == ConstantValue.
Null
&&
Binder\Binder_Invocation.cs (1)
1675
{ IsBad: true } => ConstantValue.
Null
,
Binder\Binder_Operators.cs (6)
4715
if (operand.ConstantValueOpt == ConstantValue.
Null
||
4855
if (operandConstantValue == ConstantValue.
Null
)
4865
(operandConstantValue == null || operandConstantValue == ConstantValue.
Null
); // a non-null constant is never null
5220
operand = new BoundDefaultExpression(operand.Syntax, targetType: null, constantValueOpt: ConstantValue.
Null
,
5364
/// - <see cref="ConstantValue.
Null
"/>
5390
return ConstantValue.
Null
;
Binder\Binder_Patterns.cs (3)
579
if (convertedExpression.Type is null && constantValueOpt != ConstantValue.
Null
)
608
if (expression.ConstantValueOpt == ConstantValue.
Null
)
672
if (constantValue == ConstantValue.
Null
)
Binder\DecisionDagBuilder.cs (1)
487
if (constant.ConstantValue == ConstantValue.
Null
)
Binder\LockBinder.cs (1)
46
if (expr.ConstantValueOpt != ConstantValue.
Null
|| Compilation.FeatureStrictEnabled) // Dev10 allows the null literal.
CodeGen\EmitStatement.cs (1)
1564
if (stringConstant == ConstantValue.
Null
)
Compilation\CSharpCompilation.cs (1)
2214
var dumbInstance = new BoundLiteral(syntax, ConstantValue.
Null
, namedType);
FlowAnalysis\AbstractFlowPass.cs (1)
687
return node.ConstantValueOpt == ConstantValue.
Null
;
FlowAnalysis\DefiniteAssignment.cs (1)
909
return value.ConstantValueOpt != ConstantValue.
Null
;
FlowAnalysis\NullableWalker_Patterns.cs (2)
167
bool isExplicitNullCheck = cp.Value.ConstantValueOpt == ConstantValue.
Null
;
631
Debug.Assert(t.Value != ConstantValue.
Null
);
Lowering\Extensions.cs (1)
80
if ((object)expr.Type == null && expr.ConstantValueOpt == ConstantValue.
Null
)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
383
_factory.Convert(operandType, new BoundLiteral(syntax, ConstantValue.
Null
, objectType)),
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (3)
2015
if (oldNode != null && (loweredLeft.ConstantValueOpt == ConstantValue.
Null
|| loweredRight.ConstantValueOpt == ConstantValue.
Null
))
2134
MakeLiteral(syntax, ConstantValue.
Null
, objectType),
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
454
right: MakeLiteral(forEachSyntax, constantValue: ConstantValue.
Null
, type: null),
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (1)
35
Debug.Assert(rewrittenArgument.ConstantValueOpt == ConstantValue.
Null
);
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
206
return new BoundLiteral(expr.Syntax, ConstantValue.
Null
, expr.Type);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (2)
128
if (rewrittenExpression.ConstantValueOpt == ConstantValue.
Null
)
230
if (boundLocal.ConstantValueOpt == ConstantValue.
Null
)
Lowering\SyntheticBoundNodeFactory.cs (2)
1250
BoundExpression nullLiteral = new BoundLiteral(syntax, ConstantValue.
Null
, type) { WasCompilerGenerated = true };
1803
return RewriteNullableNullEquality(syntax, operatorKind, rewrittenExpr, Literal(ConstantValue.
Null
, objectType), boolType);
Symbols\Source\SourceComplexParameterSymbol.cs (1)
412
var value = convertedExpression.ConstantValueOpt ?? ConstantValue.
Null
;
Symbols\TypeSymbolExtensions.cs (1)
638
return ConstantValue.
Null
;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenOverridingAndHiding.cs (1)
4123
Assert.Equal(ConstantValue.
Null
, parameterB.ExplicitDefaultConstantValue);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
532
Assert.Equal(ConstantValue.
Null
, constantValue);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ConstantTests.cs (1)
4025
nullConst = ConstantValue.
Null
;
Semantics\NamedAndOptionalTests.cs (5)
2143
Assert.Equal(ConstantValue.
Null
, parameters[1].ExplicitDefaultConstantValue);
2194
Assert.Equal(ConstantValue.
Null
, parameters[1].ExplicitDefaultConstantValue);
2213
Assert.Equal(ConstantValue.
Null
, parameters[4].ExplicitDefaultConstantValue);
2219
Assert.Equal(ConstantValue.
Null
, parameters[5].ExplicitDefaultConstantValue);
2359
Assert.Equal(ConstantValue.
Null
, parameters[1].ExplicitDefaultConstantValue);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (3)
PDB\PdbHelpers.cs (3)
101
(SpecialType.System_String, 0) => ConstantValue.
Null
,
104
(SpecialType.System_Object, 0) => ConstantValue.
Null
,
107
(SpecialType.None, 0) when type.IsReferenceType => ConstantValue.
Null
,