9 references to CanContainNull
Microsoft.CodeAnalysis.CSharp (9)
Binder\Binder_Operators.cs (1)
3442operandType.CanContainNull() && // a non-nullable value type is never null
Binder\DecisionDagBuilder.cs (1)
437if (input.Type.CanContainNull() &&
FlowAnalysis\NullableWalker.cs (3)
5455private static bool PossiblyNullableType([NotNullWhen(true)] TypeSymbol? operandType) => operandType?.CanContainNull() == true; 11602if (type.CanContainNull()) 11652SetResultType(node, TypeWithState.Create(node.Type, node.Type?.CanContainNull() != false && node.ConstantValueOpt?.IsNull == true ? NullableFlowState.MaybeDefault : NullableFlowState.NotNull));
Symbols\TypeWithState.cs (4)
36var state = defaultState != NullableFlowState.NotNull && type?.CanContainNull() != false ? NullableFlowState.MaybeNull : NullableFlowState.NotNull; 46if (type.CanContainNull()) 71Debug.Assert(state == NullableFlowState.NotNull || type?.CanContainNull() != false); 94(State.IsNotNull() || Type?.CanContainNull() == false ? NullableAnnotation.NotAnnotated : NullableAnnotation.Annotated);