Skip to content

Commit 98862c0

Browse files
committed
Remove unnecessary case annotations
1 parent 62f49cd commit 98862c0

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4230,18 +4230,15 @@ defmodule Kernel do
42304230
defmacro left && right do
42314231
assert_no_match_or_guard_scope(__CALLER__.context, "&&")
42324232

4233-
annotate_case(
4234-
[type_check: :expr],
4235-
quote do
4236-
case unquote(left) do
4237-
x when :"Elixir.Kernel".in(x, [false, nil]) ->
4238-
x
4233+
quote do
4234+
case unquote(left) do
4235+
x when :"Elixir.Kernel".in(x, [false, nil]) ->
4236+
x
42394237

4240-
_ ->
4241-
unquote(right)
4242-
end
4238+
_ ->
4239+
unquote(right)
42434240
end
4244-
)
4241+
end
42454242
end
42464243

42474244
@doc """
@@ -4273,18 +4270,15 @@ defmodule Kernel do
42734270
defmacro left || right do
42744271
assert_no_match_or_guard_scope(__CALLER__.context, "||")
42754272

4276-
annotate_case(
4277-
[type_check: :expr],
4278-
quote do
4279-
case unquote(left) do
4280-
x when :"Elixir.Kernel".in(x, [false, nil]) ->
4281-
unquote(right)
4273+
quote do
4274+
case unquote(left) do
4275+
x when :"Elixir.Kernel".in(x, [false, nil]) ->
4276+
unquote(right)
42824277

4283-
x ->
4284-
x
4285-
end
4278+
x ->
4279+
x
42864280
end
4287-
)
4281+
end
42884282
end
42894283

42904284
@doc """

0 commit comments

Comments
 (0)