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