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