diff options
author | Andrea Leopardi <an.leopardi@gmail.com> | 2021-12-11 07:33:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-11 07:33:39 +0100 |
commit | f7cbee5e74e1288f7d2183591d44cb14714e12ce (patch) | |
tree | 09f0109326c35c204ea81cdcb3e7a6d9cf495fb0 | |
parent | 97ac2742f724494b1d3b55c30639a1e7e631db37 (diff) | |
download | elixir-f7cbee5e74e1288f7d2183591d44cb14714e12ce.tar.gz |
Export types in Module (#11464)
Export t:Module.definition/0 and t:Module.def_kind/0.
They are referenced throughout the documentation for Module
so it makes sense to expose them.
-rw-r--r-- | lib/elixir/lib/module.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/elixir/lib/module.ex b/lib/elixir/lib/module.ex index f80b796c8..dfb6ba977 100644 --- a/lib/elixir/lib/module.ex +++ b/lib/elixir/lib/module.ex @@ -518,8 +518,8 @@ defmodule Module do ''' - @typep definition :: {atom, arity} - @typep def_kind :: :def | :defp | :defmacro | :defmacrop + @type definition :: {atom, arity} + @type def_kind :: :def | :defp | :defmacro | :defmacrop @extra_error_msg_defines? "Use Kernel.function_exported?/3 and Kernel.macro_exported?/3 " <> "to check for public functions and macros instead" @@ -1100,7 +1100,7 @@ defmodule Module do """ @doc since: "1.7.0" @spec defines_type?(module, definition) :: boolean - def defines_type?(module, definition) do + def defines_type?(module, definition) when is_atom(module) do Kernel.Typespec.defines_type?(module, definition) end |