Skip to content

Commit 57a09f2

Browse files
committed
Fix a bug that prevented from inspecting immediate values in typespecs (such as ...)
1 parent 3e320fd commit 57a09f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/lib/kernel/typespec.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,12 @@ defmodule Kernel.Typespec do
472472
typespec_to_ast({ :ann_type, line, [{ :var, line1, name }, type] })
473473
end
474474

475-
476475
defp typespec_to_ast({ t, _line, atom }) when is_atom(t) do
477476
atom
478477
end
479478

479+
defp typespec_to_ast(other), do: other
480+
480481
## From AST conversion
481482

482483
# Handle unions

0 commit comments

Comments
 (0)