Elixir: h helper fails on operators

Created on 23 Jun 2016  路  2Comments  路  Source: elixir-lang/elixir

Environment

  • Elixir version: 1.3.0
  • Operating system: Both Mac OS X 10.11.5 and Windows 7.

    Current behavior

h's introspection fails on operators. Example:

iex(1)> h ==/2
** (FunctionClauseError) no function clause matching in IEx.Introspection.has_content?/1
       (iex) lib/iex/introspection.ex:142: IEx.Introspection.has_content?(nil)
       (iex) lib/iex/introspection.ex:127: IEx.Introspection.find_doc/3
       (iex) lib/iex/introspection.ex:109: IEx.Introspection.h_mod_fun_arity/3
       (iex) lib/iex/introspection.ex:86: anonymous fn/3 in IEx.Introspection.h/3
    (elixir) lib/enum.ex:2510: Enum.do_any?/2
       (iex) lib/iex/introspection.ex:85: IEx.Introspection.h/3

h div/2 and h rem/2 are also affected, but not h div or h rem.

Expected behavior

Help information about the operator or function.

Most helpful comment

@milmazz Sorry, I just saw your comment, I just finished working on it, so I will send a PR if you don't mind!

All 2 comments

If you try h Kernel.div/2 it works, seems to be missing a matching clause in has_content?. I'll try to fix it.

@milmazz Sorry, I just saw your comment, I just finished working on it, so I will send a PR if you don't mind!

Was this page helpful?
0 / 5 - 0 ratings