File 3571-features-Add-tagged-message-to-avoid-irrelevant-capt.patch of Package erlang
From 62336c9947fc0b37c4902a64321b87315d471bc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cons=20T=20=C3=85hs?= <cons@erlang.org>
Date: Thu, 21 Apr 2022 16:56:20 +0200
Subject: [PATCH 1/6] [features] Add tagged message to avoid irrelevant capture
---
lib/stdlib/src/epp.erl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl
index d642b53bf4..066b02f483 100644
--- a/lib/stdlib/src/epp.erl
+++ b/lib/stdlib/src/epp.erl
@@ -325,7 +325,7 @@ parse_file(Ifile, Options) ->
{ok,Epp,Extra} ->
Forms = parse_file(Epp),
Epp ! {get_features, self()},
- Ftrs = receive X -> X end,
+ Ftrs = receive {features, X} -> X end,
close(Epp),
{ok, Forms, [{features, Ftrs} | Extra]};
{error,E} ->
@@ -725,7 +725,7 @@ wait_request(St) ->
receive
{epp_request,From,scan_erl_form} -> From;
{get_features, From} ->
- From ! St#epp.features,
+ From ! {features, St#epp.features},
wait_request(St);
{epp_request,From,macro_defs} ->
%% Return the old format to avoid any incompability issues.
--
2.35.3