Skip to content

Commit c11f8f8

Browse files
committed
Concise
1 parent 70a2477 commit c11f8f8

1 file changed

Lines changed: 7 additions & 20 deletions

File tree

lib/elixir/lib/module/types/descr.ex

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -913,26 +913,13 @@ defmodule Module.Types.Descr do
913913
descr = Map.get(descr, :dynamic, descr)
914914

915915
case descr do
916-
%{atom: {:union, %{true => _, false => _}}} ->
917-
:undefined
918-
919-
%{atom: {:union, %{true => _}}} ->
920-
:always_true
921-
922-
%{atom: {:union, %{false => _}}} ->
923-
:always_false
924-
925-
%{atom: {:negation, %{true => _, false => _}}} ->
926-
:undefined
927-
928-
%{atom: {:negation, %{true => _}}} ->
929-
:always_false
930-
931-
%{atom: {:negation, %{false => _}}} ->
932-
:always_true
933-
934-
_ ->
935-
:undefined
916+
%{atom: {:union, %{true => _, false => _}}} -> :undefined
917+
%{atom: {:union, %{true => _}}} -> :always_true
918+
%{atom: {:union, %{false => _}}} -> :always_false
919+
%{atom: {:negation, %{true => _, false => _}}} -> :undefined
920+
%{atom: {:negation, %{true => _}}} -> :always_false
921+
%{atom: {:negation, %{false => _}}} -> :always_true
922+
_ -> :undefined
936923
end
937924
end
938925

0 commit comments

Comments
 (0)