34 references to MaybeDefault
Microsoft.CodeAnalysis.CSharp (34)
FlowAnalysis\NullableWalker.cs (24)
784
? NullableFlowState.
MaybeDefault
841
SetState(ref this.State, memberSlot, type.Type.IsPossiblyNullableReferenceTypeTypeParameter() ? NullableFlowState.
MaybeDefault
: NullableFlowState.MaybeNull);
2357
valueType.State == NullableFlowState.
MaybeDefault
;
2867
return TypeWithState.Create(parameterType.Type, NullableFlowState.
MaybeDefault
);
5845
SetResultType(node, TypeWithState.Create(resultType, NullableFlowState.
MaybeDefault
));
6651
return TypeWithState.Create(typeWithState.Type, NullableFlowState.
MaybeDefault
);
7634
return TypeWithState.Create(typeWithState.Type, NullableFlowState.
MaybeDefault
);
7655
return TypeWithState.Create(typeWithState.Type, NullableFlowState.
MaybeDefault
);
7674
return TypeWithState.Create(typeWithState.Type, NullableFlowState.
MaybeDefault
);
9139
resultState = targetType?.IsTypeParameterDisallowingAnnotationInCSharp8() == true ? NullableFlowState.
MaybeDefault
: NullableFlowState.MaybeNull;
9157
return NullableFlowState.
MaybeDefault
;
9163
return (annotation == NullableAnnotation.Annotated) ? NullableFlowState.
MaybeDefault
: NullableFlowState.MaybeNull;
9167
case NullableFlowState.
MaybeDefault
:
9188
return NullableFlowState.
MaybeDefault
;
9198
return (annotation == NullableAnnotation.Annotated) ? NullableFlowState.
MaybeDefault
: NullableFlowState.MaybeNull;
9213
return NullableFlowState.
MaybeDefault
;
9223
return NullableFlowState.
MaybeDefault
;
11477
SetResultType(node, TypeWithState.Create(node.Type, NullableFlowState.
MaybeDefault
));
11553
resultState = NullableFlowState.
MaybeDefault
;
11591
SetResultType(node, TypeWithState.Create(node.Type, node.Type?.CanContainNull() != false && node.ConstantValueOpt?.IsNull == true ? NullableFlowState.
MaybeDefault
: NullableFlowState.NotNull));
12450
(false, true) => NullableFlowState.
MaybeDefault
,
12479
NullableFlowState.
MaybeDefault
=> (false, true),
12577
var mayBeNull = GetValue(i) is NullableFlowState.MaybeNull or NullableFlowState.
MaybeDefault
;
12609
NullableFlowState.
MaybeDefault
=> "??",
Symbols\ConstraintsHelper.cs (1)
1213
return type.IsTypeParameterDisallowingAnnotationInCSharp8() ? NullableFlowState.
MaybeDefault
: NullableFlowState.MaybeNull;
Symbols\NullableFlowStateExtensions.cs (1)
34
CSharp.NullableFlowState.
MaybeDefault
=> CodeAnalysis.NullableFlowState.MaybeNull,
Symbols\TypeWithAnnotations.cs (3)
817
return annotation.IsAnnotated() ? NullableFlowState.
MaybeDefault
: NullableFlowState.NotNull;
821
return annotation switch { NullableAnnotation.Annotated => NullableFlowState.
MaybeDefault
, NullableAnnotation.NotAnnotated => NullableFlowState.MaybeNull, _ => NullableFlowState.NotNull };
825
return annotation switch { NullableAnnotation.Annotated => NullableFlowState.
MaybeDefault
, _ => NullableFlowState.NotNull };
Symbols\TypeWithState.cs (5)
25
return Create(type, NullableFlowState.
MaybeDefault
);
30
if (defaultState == NullableFlowState.
MaybeDefault
&&
50
state = NullableFlowState.
MaybeDefault
;
72
Debug.Assert(state != NullableFlowState.
MaybeDefault
|| type is null || type.IsTypeParameterDisallowingAnnotationInCSharp8());
90
return (State == NullableFlowState.
MaybeDefault
|| asAnnotatedType) ? type.SetIsAnnotated(compilation) : type;