Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
3502-STDLIB-Eliminate-use-of-unquoted-atom-mayb...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3502-STDLIB-Eliminate-use-of-unquoted-atom-maybe.patch of Package erlang
From 2e4c52d00f9d6ba3e44280e6f62fae61168974f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Wed, 10 Nov 2021 10:01:04 +0100 Subject: [PATCH 02/12] STDLIB: Eliminate use of unquoted atom 'maybe' The test suite for syntax_tools tries to parse all files in Kernel and STDLIB (with `maybe` and `else` as reserved keywords), so for that test case to succeed, we must quote all uses of `maybe`. --- lib/stdlib/src/erl_lint.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 95e2ed8847..fb5cb33c9b 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -4211,7 +4211,7 @@ check_format_2a(Fmt, FmtAnno, As) -> false -> Anno = element(2, As), {warn,1,Anno,"format arguments not a list",[]}; - maybe -> + 'maybe' -> Anno = erl_parse:first_anno(As), {warn,2,Anno,"format arguments perhaps not a list",[]} end. @@ -4257,12 +4257,12 @@ arguments(N) -> args_list({cons,_A,_H,T}) -> args_list(T); %% Strange case: user has written something like [a | "bcd"]; pretend %% we don't know: -args_list({string,_A,_Cs}) -> maybe; +args_list({string,_A,_Cs}) -> 'maybe'; args_list({nil,_A}) -> true; args_list({atom,_,_}) -> false; args_list({integer,_,_}) -> false; args_list({float,_,_}) -> false; -args_list(_Other) -> maybe. +args_list(_Other) -> 'maybe'. args_length({cons,_A,_H,T}) -> 1 + args_length(T); args_length({nil,_A}) -> 0. -- 2.34.1
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