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: 0 additions & 2 deletions lib/elixir/lib/module/behaviour.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ defmodule Module.Behaviour do
module: module,
file: file,
line: line,
# Map containing the callbacks to be implemented
callbacks: %{},
# list of warnings {message, env}
warnings: []
}
end
Expand Down
17 changes: 8 additions & 9 deletions lib/elixir/lib/module/types.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,9 @@ defmodule Module.Types do
end

defp warnings_from_clause(meta, args, guards, body, stack, context) do
with {:ok, _types, context} <- Pattern.of_head(args, guards, meta, stack, context),
{:ok, _type, context} <- Expr.of_expr(body, stack, context) do
context.warnings
else
{:error, context} -> context.warnings
end
{_types, context} = Pattern.of_head(args, guards, meta, stack, context)
{_type, context} = Expr.of_expr(body, stack, context)
context.warnings
end

@doc false
Expand All @@ -83,10 +80,12 @@ defmodule Module.Types do
%{
# A list of all warnings found so far
warnings: [],
# Information about all vars and their types
# All vars and their types
vars: %{},
# Information about variables and arguments from patterns
pattern_info: nil
# Variables and arguments from patterns
pattern_info: nil,
# If type checking has found an error/failure
failed: false
}
end
end
Loading
Loading