/// <summary> /// Meet two nullable annotations for computing the nullable annotation of a type parameter from upper bounds. /// This uses the contravariant merging rules. /// </summary> public static NullableAnnotation Meet(this NullableAnnotation a, NullableAnnotation b) { if (a.IsNotAnnotated() || b.IsNotAnnotated()) { return(NullableAnnotation.NotAnnotated); } return((a < b) ? a : b); }
internal bool IsPossiblyNullableTypeTypeParameter() { return NullableAnnotation.IsNotAnnotated() && (Type?.IsPossiblyNullableReferenceTypeTypeParameter() == true || Type?.IsNullableTypeOrTypeParameter() == true); }