Skip to content

Commit 9e382c0

Browse files
committed
No ok in expr
1 parent 1f14265 commit 9e382c0

File tree

6 files changed

+210
-311
lines changed

6 files changed

+210
-311
lines changed

lib/elixir/lib/module/types.ex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ defmodule Module.Types do
5252
end
5353

5454
defp warnings_from_clause(meta, args, guards, body, stack, context) do
55-
with {:ok, _types, context} <- Pattern.of_head(args, guards, meta, stack, context),
56-
{:ok, _type, context} <- Expr.of_expr(body, stack, context) do
57-
context.warnings
58-
else
59-
{:error, context} -> context.warnings
55+
case Pattern.of_head(args, guards, meta, stack, context) do
56+
{:ok, _types, context} ->
57+
{_type, context} = Expr.of_expr(body, stack, context)
58+
context.warnings
59+
60+
{:error, context} ->
61+
context.warnings
6062
end
6163
end
6264

0 commit comments

Comments
 (0)