This is most likely the job of Dialyzer and tools working on typespecs to
do. As they can do a better job at that.

On Mon, Apr 5, 2021 at 2:13 AM eksperimental <eksperimen...@autistici.org>
wrote:

> Hi,
> I would like to propose that the compiler emits a warning when specs
> are duplicated.
>
> defmodule DuplicatedSpecs do
>   @spec foo(arg) :: {:ok, arg} when arg: term
>   @spec foo(arg) :: {:ok, arg} when arg: term
>   def foo(term), do: {:ok, term}
> end
>
> The reason is that the duplicated line should either be removed or
> corrected because the user meant something else.
>
> Let me know what you all think,
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/606a561a.1c69fb81.6b97f.649dSMTPIN_ADDED_MISSING%40gmr-mx.google.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4L%2BU74t_objVu38HWjdG%2BKfYhCSQ%3Db%3D2GMF-dMKVdn1BA%40mail.gmail.com.

Reply via email to