[nullsafe] Decouple nullsafe mode from issue calculation, Field Initialization

Summary:
This diff finishes work in D20491716.
We removed dependency on nullsafe mode for field initialization in
D20491716, so this diff just formalizes it.

Reviewed By: jvillard

Differential Revision: D20493164

fbshipit-source-id: 6ac612e78
master
Mitya Lyubarskiy 5 years ago committed by Facebook GitHub Bot
parent 2af561c593
commit e3e7a376c5

@ -305,7 +305,7 @@ let check_constructor_initialization tenv find_canonical_duplicate curr_construc
()
else
register_error tenv find_canonical_duplicate
(TypeErr.Field_not_initialized {nullsafe_mode; field_name})
(TypeErr.Field_not_initialized {field_name})
None ~nullsafe_mode loc curr_constructor_pdesc ;
(* Check if field is over-annotated. *)
match annotated_field with

@ -65,7 +65,7 @@ type err_instance =
; violation_type: InheritanceRule.ReportableViolation.violation_type
; base_proc_name: Procname.t
; overridden_proc_name: Procname.t }
| Field_not_initialized of {nullsafe_mode: NullsafeMode.t; field_name: Fieldname.t}
| Field_not_initialized of {field_name: Fieldname.t}
| Over_annotation of
{ over_annotated_violation: OverAnnotatedRule.violation
; violation_type: OverAnnotatedRule.violation_type }

@ -41,7 +41,7 @@ type err_instance =
; violation_type: InheritanceRule.ReportableViolation.violation_type
; base_proc_name: Procname.t
; overridden_proc_name: Procname.t }
| Field_not_initialized of {nullsafe_mode: NullsafeMode.t; field_name: Fieldname.t}
| Field_not_initialized of {field_name: Fieldname.t}
| Over_annotation of
{ over_annotated_violation: OverAnnotatedRule.violation
; violation_type: OverAnnotatedRule.violation_type }

Loading…
Cancel
Save