File 3422-dialyzer-simplify-function.patch of Package erlang

From 5abca7678204da70a3a5475eeaab7c377cbd1717 Mon Sep 17 00:00:00 2001
From: Kiko Fernandez-Reyes <kiko@erlang.org>
Date: Fri, 2 Dec 2022 09:50:53 +0100
Subject: [PATCH 2/4] dialyzer: simplify function

---
 lib/dialyzer/src/dialyzer_cl.erl | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/lib/dialyzer/src/dialyzer_cl.erl b/lib/dialyzer/src/dialyzer_cl.erl
index 86b29e027a..dd235d9025 100644
--- a/lib/dialyzer/src/dialyzer_cl.erl
+++ b/lib/dialyzer/src/dialyzer_cl.erl
@@ -401,15 +401,10 @@ do_analysis(Files, Options, Plt, PltInfo) ->
   report_elapsed_time(T1, T2, Options),
   Return.
 
-convert_analysis_type(plt_check, true)   -> succ_typings;
-convert_analysis_type(plt_check, false)  -> plt_build;
-convert_analysis_type(plt_add, true)     -> succ_typings;
-convert_analysis_type(plt_add, false)    -> plt_build;
-convert_analysis_type(plt_build, true)   -> succ_typings;
-convert_analysis_type(plt_build, false)  -> plt_build;
-convert_analysis_type(plt_remove, true)  -> succ_typings;
-convert_analysis_type(plt_remove, false) -> plt_build;
-convert_analysis_type(succ_typings, _)   -> succ_typings.
+-spec convert_analysis_type(anal_type1(), boolean()) -> succ_typings | plt_build.
+convert_analysis_type(succ_typings, _) -> succ_typings;
+convert_analysis_type(_, true) -> succ_typings;
+convert_analysis_type(_, false) -> plt_build.
 
 %%--------------------------------------------------------------------
 
-- 
2.35.3

openSUSE Build Service is sponsored by