From 6305bc9e470735c748abbb8b10c1a69e8bf962e3 Mon Sep 17 00:00:00 2001 From: Mitya Lyubarskiy Date: Thu, 7 May 2020 03:05:17 -0700 Subject: [PATCH] [nullsafe] Improve diagnostic message Summary: This will allow us to track cases when this assert fires Reviewed By: ngorogiannis Differential Revision: D21427776 fbshipit-source-id: 96b6d7c3b --- infer/src/nullsafe/NullsafeMode.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infer/src/nullsafe/NullsafeMode.ml b/infer/src/nullsafe/NullsafeMode.ml index c6d09ace1..aa85cda21 100644 --- a/infer/src/nullsafe/NullsafeMode.ml +++ b/infer/src/nullsafe/NullsafeMode.ml @@ -203,7 +203,9 @@ and weak_type = ExtraTrustClass of JavaClassName.t list | Other let check_problematic_class_annotation tenv user_defined_class = if JavaClassName.is_anonymous_inner_class_name user_defined_class then Logging.die InternalError - "check_problematic_class_annotation: should not be called for anonymous classes" ; + "check_problematic_class_annotation: should not be called for anonymous classes, but was \ + called for %a" + JavaClassName.pp user_defined_class ; Option.value_map (JavaClassName.get_outer_class_name user_defined_class) ~f:(fun outer_class_name ->