Module Nullsafe__TypeOrigin
type method_parameter_origin=|Normal of Nullsafe.AnnotatedSignature.param_signature|ObjectEqualsOverridetype method_call_origin={pname : IR.Procname.Java.t;call_loc : IBase.Location.t;annotated_signature : Nullsafe.AnnotatedSignature.t;is_defined : bool;}
val compare_method_call_origin : method_call_origin -> method_call_origin -> int
type t=|NullConst of IBase.Location.tA null literal in the source
|NonnullConst of IBase.Location.tA constant (not equal to null) in the source.
|Field of{object_origin : t;field's object origin (object is before field access operator `.`)
field_name : IR.Fieldname.t;field_type : Nullsafe.AnnotatedType.t;access_loc : IBase.Location.t;}A field access (result of expression `some_object.some_field`)
|CurrMethodParameter of method_parameter_originParameter of a method we are currently in,
|This|MethodCall of method_call_origin|CallToGetKnownToContainsKeyThis is a result of accessing a map element that is known to contains this particular key, normally because it was explicitly checked for presense before
|NewA new object creation
|ArrayLengthResultinteger value - result of accessing array.length
|ArrayAccessResult of accessing an array by index
|InferredNonnull of{previous_origin : t;}The value is inferred as non-null during flow-sensitive type inference (most commonly from relevant condition branch or assertion explicitly comparing the value with `null`)
|OptimisticFallbackA special case: technical type variant. Indicates either cases when something went wrong during typechecking, and some cases that should be expressed in a better way than using this type. We fall back to optimistic (not-nullable) type to reduce potential non-actionable false positives. Ideally we should not see these instances. They should be either processed gracefully (and a dedicated type constructor should be added), or fixed. T54687014 tracks unsoundness issues caused by this type.
val get_nullability : t -> Nullsafe.Nullability.tval get_provisional_annotation : t -> Nullsafe.ProvisionalAnnotation.t optionIf the origin is associated with provisional annotation, return it
val get_description : t -> string optionGet a description to be used for error messages.
val to_string : t -> stringRaw string representation.