Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Nov 9, 2024
1 parent d54416e commit df12d4b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/elixir/lib/module/types.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ defmodule Module.Types do
end)

# TODO: Reuse context from patterns and guards
# TODO: Fix logger errors
{{fun, arity}, {:infer, Enum.reverse(pair_types)}}
end
end
Expand Down
11 changes: 6 additions & 5 deletions lib/elixir/src/elixir_module.erl
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ compile(Meta, Module, ModuleAsCharlist, Block, Vars, Prune, E) ->
[elixir_env:trace({remote_function, [], VerifyMod, VerifyFun, 1}, CallbackE) ||
{VerifyMod, VerifyFun} <- AfterVerify],

%% Compute signatures only if the module is valid.
case ets:member(DataSet, {elixir, taint}) of
true -> elixir_errors:compile_error(E);
false -> ok
end,

Signatures = case elixir_config:get(infer_signatures) of
true -> 'Elixir.Module.Types':infer(Module, File, AllDefinitions, CallbackE);
false -> #{}
Expand All @@ -189,11 +195,6 @@ compile(Meta, Module, ModuleAsCharlist, Block, Vars, Prune, E) ->
signatures => Signatures
},

case ets:member(DataSet, {elixir, taint}) of
true -> elixir_errors:compile_error(E);
false -> ok
end,

Binary = elixir_erl:compile(ModuleMap),
Autoload = proplists:get_value(autoload, CompileOpts, true),
spawn_parallel_checker(CheckerInfo, Module, ModuleMap),
Expand Down
2 changes: 1 addition & 1 deletion lib/mix/lib/mix/compilers/elixir.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Mix.Compilers.Elixir do
@moduledoc false

@manifest_vsn 25
@manifest_vsn 26
@checkpoint_vsn 2

import Record
Expand Down

0 comments on commit df12d4b

Please sign in to comment.