From 4a44bd4430e829c82fe212add0c8f40076cb20fd Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Thu, 16 May 2019 02:54:28 -0700 Subject: [PATCH] [eradicate] remove the constant flag return_nonnull_silent Reviewed By: mbouaziz Differential Revision: D9563114 fbshipit-source-id: 0d8377ead --- infer/src/nullsafe/eradicateChecks.ml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/infer/src/nullsafe/eradicateChecks.ml b/infer/src/nullsafe/eradicateChecks.ml index 75bfadf66..9232181d1 100644 --- a/infer/src/nullsafe/eradicateChecks.ml +++ b/infer/src/nullsafe/eradicateChecks.ml @@ -9,9 +9,6 @@ open! IStd (** Module for the checks called by Eradicate. *) -(* do not report RETURN_NOT_NULLABLE if the return is annotated @Nonnull *) -let return_nonnull_silent = true - let get_field_annotation tenv fn typ = let lookup = Tenv.lookup tenv in match Typ.Struct.get_field_type_and_annotation ~lookup fn typ with @@ -313,7 +310,7 @@ let check_return_annotation tenv find_canonical_duplicate curr_pdesc ret_range let origin_descr = TypeAnnotation.descr_origin final_ta in let return_not_nullable = final_nullable && (not ret_annotated_nullable) && (not ret_implicitly_nullable) - && not (return_nonnull_silent && ret_annotated_nonnull) + && not ret_annotated_nonnull in let return_value_not_present = Config.eradicate_optional_present && (not final_present) && ret_annotated_present