33 references to MaybeNull
Microsoft.CodeAnalysis.CSharp (33)
FlowAnalysis\NullableWalker.cs (21)
786
: NullableFlowState.
MaybeNull
;
842
SetState(ref this.State, memberSlot, type.Type.IsPossiblyNullableReferenceTypeTypeParameter() ? NullableFlowState.MaybeDefault : NullableFlowState.
MaybeNull
);
1169
SetState(ref this.State, memberSlot, NullableFlowState.
MaybeNull
);
2342
case NullableFlowState.
MaybeNull
:
2700
NullableFlowState value = isDefaultValue ? NullableFlowState.
MaybeNull
: fieldOrPropertyType.ToTypeWithState().State;
4057
resultState = NullableFlowState.
MaybeNull
;
4926
resultState = NullableFlowState.
MaybeNull
; // Delegate removal can produce null.
5518
SetState(ref state, slot, NullableFlowState.
MaybeNull
);
9200
resultState = targetType?.IsTypeParameterDisallowingAnnotationInCSharp8() == true ? NullableFlowState.MaybeDefault : NullableFlowState.
MaybeNull
;
9212
case NullableFlowState.
MaybeNull
:
9224
return (annotation == NullableAnnotation.Annotated) ? NullableFlowState.MaybeDefault : NullableFlowState.
MaybeNull
;
9231
return NullableFlowState.
MaybeNull
;
9244
if (state == NullableFlowState.
MaybeNull
)
9259
return (annotation == NullableAnnotation.Annotated) ? NullableFlowState.MaybeDefault : NullableFlowState.
MaybeNull
;
9272
if (state == NullableFlowState.
MaybeNull
)
9282
if (state == NullableFlowState.
MaybeNull
)
11760
node.IsAddition ? GetState(ref this.State, memberSlot).Meet(ResultType.State) : NullableFlowState.
MaybeNull
);
12510
(true, false) => NullableFlowState.
MaybeNull
,
12539
NullableFlowState.
MaybeNull
=> (true, false),
12638
var mayBeNull = GetValue(i) is NullableFlowState.
MaybeNull
or NullableFlowState.MaybeDefault;
12669
NullableFlowState.
MaybeNull
=> "?",
Symbols\ConstraintsHelper.cs (4)
1208
return type.IsNullableTypeOrTypeParameter() ? NullableFlowState.
MaybeNull
: NullableFlowState.NotNull;
1213
return type.IsTypeParameterDisallowingAnnotationInCSharp8() ? NullableFlowState.MaybeDefault : NullableFlowState.
MaybeNull
;
1235
return result ?? NullableFlowState.
MaybeNull
;
1267
return state == NullableFlowState.
MaybeNull
;
Symbols\NullableFlowStateExtensions.cs (3)
19
/// The result is <see cref="NullableFlowState.
MaybeNull
"/> if either operand is that.
33
CSharp.NullableFlowState.
MaybeNull
=> CodeAnalysis.NullableFlowState.MaybeNull,
44
CodeAnalysis.NullableFlowState.MaybeNull => CSharp.NullableFlowState.
MaybeNull
,
Symbols\TypeWithAnnotations.cs (3)
821
return annotation switch { NullableAnnotation.Annotated => NullableFlowState.MaybeDefault, NullableAnnotation.NotAnnotated => NullableFlowState.
MaybeNull
, _ => NullableFlowState.NotNull };
829
return NullableFlowState.
MaybeNull
;
831
return annotation switch { NullableAnnotation.Annotated => NullableFlowState.
MaybeNull
, _ => NullableFlowState.NotNull };
Symbols\TypeWithState.cs (2)
20
public bool MayBeNull => State == NullableFlowState.
MaybeNull
;
36
var state = defaultState != NullableFlowState.NotNull && type?.CanContainNull() != false ? NullableFlowState.
MaybeNull
: NullableFlowState.NotNull;