Skip to content

Commit 238eda2

Browse files
author
José Valim
committed
Update to Erlang 17.0
1 parent a7c6b8d commit 238eda2

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ notifications:
66
77
88
otp_release:
9-
- 17.0-rc1
9+
- 17.0

lib/elixir/src/elixir_compiler.erl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ module(Forms, File, RawOptions, Bootstrap, Callback) when
140140
Options = RawOptions ++ elixir_code_server:call(erl_compiler_options),
141141
Listname = elixir_utils:characters_to_list(File),
142142

143-
case compile:noenv_forms([no_auto_import()|Forms], [return,{source,Listname}|Options]) of
143+
case compile:noenv_forms(Forms, [no_auto_import,return,{source,Listname}|Options]) of
144144
{ok, ModuleName, Binary, Warnings} ->
145145
format_warnings(Bootstrap, Warnings),
146146
code:load_binary(ModuleName, Listname, Binary),
@@ -150,10 +150,6 @@ module(Forms, File, RawOptions, Bootstrap, Callback) when
150150
format_errors(Errors)
151151
end.
152152

153-
no_auto_import() ->
154-
Bifs = [{ Name, Arity } || { Name, Arity } <- erlang:module_info(exports), erl_internal:bif(Name, Arity)],
155-
{ attribute, 0, compile, { no_auto_import, Bifs } }.
156-
157153
%% CORE HANDLING
158154

159155
core() ->

lib/elixir/src/elixir_translator.erl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,19 +231,14 @@ translate({ { '.', _, [Left, Right] }, Meta, Args }, S)
231231
TVar = { var, Line, Var },
232232
TMap = { tuple, Line, [{ atom, Line, badarg }, TVar] },
233233

234-
%% TODO: There is a bug in Erlang where %{} = 1 matches.
235-
%% Once the bug is fixed, replace the second clause by a
236-
%% map match instead of a guard check.
237234
{ { 'case', -1, TLeft, [
238235
{ clause, -1,
239236
[{ map, Line, [{ map_field_exact, Line, TRight, TVar }] }],
240237
[],
241238
[TVar] },
242239
{ clause, -1,
243-
% [{ match, Line, { map, Line, [] }, TVar }],
244-
% []
245-
[TVar],
246-
[[?wrap_call(Line, erlang, is_map, [TVar])]],
240+
[{ match, Line, { map, Line, [] }, TVar }],
241+
[],
247242
[?wrap_call(Line, erlang, error, [TMap])] },
248243
{ clause, -1,
249244
[TVar],

0 commit comments

Comments
 (0)