Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang
erlang
4422-compiler-Fix-deprecation-handling-in-beam_...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4422-compiler-Fix-deprecation-handling-in-beam_doc.patch of Package erlang
From bad85ce0eaf1347c0860666eb2c3ff363e0231e7 Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Wed, 28 Feb 2024 13:34:01 +0100 Subject: [PATCH 2/6] compiler: Fix deprecation handling in beam_doc --- bootstrap/lib/compiler/ebin/beam_doc.beam | Bin 18516 -> 21636 bytes lib/compiler/src/beam_doc.erl | 10 ++++++++++ .../test/beam_doc_SUITE_data/deprecated.erl | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/compiler/src/beam_doc.erl b/lib/compiler/src/beam_doc.erl index 94270a263b..f4c6ed46a9 100644 --- a/lib/compiler/src/beam_doc.erl +++ b/lib/compiler/src/beam_doc.erl @@ -287,6 +287,16 @@ preprocessing(AST, State) -> end, foldl(PreprocessingFuns, State, AST). +extract_deprecated({attribute, Anno, deprecated, Deprecations}, State) + when is_list(Deprecations) -> + lists:foldl(fun(D, S) -> + extract_deprecated({attribute, Anno, deprecated, D}, S) + end, State, Deprecations); +extract_deprecated({attribute, Anno, deprecated_type, Deprecations}, State) + when is_list(Deprecations) -> + lists:foldl(fun(D, S) -> + extract_deprecated({attribute, Anno, deprecated_type, D}, S) + end, State, Deprecations); extract_deprecated({attribute, Anno, deprecated, {F, A}}, State) -> extract_deprecated({attribute, Anno, deprecated, {F, A, undefined}}, State); extract_deprecated({attribute, _, deprecated, {F, A, Reason}}, State) -> diff --git a/lib/compiler/test/beam_doc_SUITE_data/deprecated.erl b/lib/compiler/test/beam_doc_SUITE_data/deprecated.erl index a2edfec1b0..4a4147b46f 100644 --- a/lib/compiler/test/beam_doc_SUITE_data/deprecated.erl +++ b/lib/compiler/test/beam_doc_SUITE_data/deprecated.erl @@ -20,7 +20,7 @@ -ifdef(ALL_WILDCARD). -deprecated({'_', '_', ?REASON}). -else. --deprecated({test, 1, ?REASON}). +-deprecated([{test, 1, ?REASON}]). -endif. -endif. -deprecated({test, 0}). @@ -31,7 +31,7 @@ -ifdef(ALL_WILDCARD). -deprecated_type({'_', '_', ?TREASON}). -else. --deprecated_type({test, 1, ?TREASON}). +-deprecated_type([{test, 1, ?TREASON}]). -endif. -endif. -deprecated_type({test, 0}). -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor