Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/compiler/src/sys_core_fold.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2901,7 +2901,7 @@ void() -> #c_literal{val=ok}.
descend(_Core, #sub{top=false}=Sub) ->
Sub;
descend(Core, #sub{top=true}=Sub) ->
case should_suppress_warning(Core) of
case is_compiler_generated(Core) of
true ->
%% In a list comprehension being ignored such as:
%%
Expand Down
23 changes: 21 additions & 2 deletions lib/compiler/test/warnings_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
underscore/1,no_warnings/1,
bit_syntax/1,inlining/1,tuple_calls/1,
recv_opt_info/1,opportunistic_warnings/1,
eep49/1,inline_list_funcs/1]).
eep49/1,inline_list_funcs/1,gh_11472/1]).

init_per_testcase(_Case, Config) ->
Config.
Expand All @@ -71,7 +71,7 @@ groups() ->
redundant_boolean_clauses,
underscore,no_warnings,bit_syntax,inlining,
tuple_calls,recv_opt_info,opportunistic_warnings,
eep49,inline_list_funcs]}].
eep49,inline_list_funcs,gh_11472]}].

init_per_suite(Config) ->
test_lib:recompile(?MODULE),
Expand Down Expand Up @@ -1363,6 +1363,25 @@ inline_list_funcs(Config) ->

ok.

gh_11472(Config) ->
Ts = [{nowarn,
<<"-export([f/1]).
f(Acc) ->
X = 0,
{Y} =
begin
_Fresh1 = {[X | Acc]},
_Fresh1
end,
Y.
">>,
[],
[]}
],
[] = run(Config,Ts),

ok.


%%%
%%% End of test cases.
Expand Down
Loading