File 1905-Make-singleton_inference-validator-test-not-use-a-LC.patch of Package erlang

From 4805b610bdfa7decb575a70356c64e840f81f0dc Mon Sep 17 00:00:00 2001
From: Richard Carlsson <carlsson.richard@gmail.com>
Date: Fri, 31 Jan 2025 13:29:43 +0100
Subject: [PATCH 5/8] Make singleton_inference validator test not use a LC

The test still exercises the same type conflict bug.
---
 .../singleton_inference.erl                          | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/compiler/test/beam_validator_SUITE_data/singleton_inference.erl b/lib/compiler/test/beam_validator_SUITE_data/singleton_inference.erl
index 66f0bb312a..ce0ea8b907 100644
--- a/lib/compiler/test/beam_validator_SUITE_data/singleton_inference.erl
+++ b/lib/compiler/test/beam_validator_SUITE_data/singleton_inference.erl
@@ -1,7 +1,17 @@
+%% %CopyrightBegin%
+%%
+%% SPDX-License-Identifier: Apache-2.0
+%%
+%% Copyright Ericsson AB 1998-2025. All Rights Reserved.
+%%
+%% %CopyrightEnd%
 -module(singleton_inference).
 -export([test/0]).
 
 test() ->
     {'EXIT',{{badmatch,true}, _}} =
-        catch [0 || (X = (true or (X = is_port(node()))))],
+        catch case X = (true or (X = is_port(node()))) of
+                  true -> 1;
+                  false -> 0
+              end,
     ok.
-- 
2.51.0

openSUSE Build Service is sponsored by