Elixir 简单模块仅产生 "Argument Error"

Elixir Simple module produces "Argument Error" only

我有一个简单的独立模块,它产生:

elixir impl_bad.ex
** (ArgumentError) argument error

在 iex 中:

=> iex
Erlang/OTP 23 [erts-11.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]

Interactive Elixir (1.9.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> c "impl_bad.ex"

== Compilation error in file impl_bad.ex ==
** (ArgumentError) argument error

** (ArgumentError) argument error

代码:

defmodule ImplBad do
  def run_addition_problems(aconfig) do
    do_addition_problems(aconfig)
  end
end

将这 5 行代码单独放在一个文件中。

我知道 do_addition_problems() 不会 存在但我希望出现未定义的错误 带有行号。

我从一个项目文件中提取了这段代码 do_addition_problems() 确实存在。

我希望从 编译器。我不得不从 一个大约 1k LOC 的模块来查明这个问题。

这是 elixir 1.9.4 的问题吗?

这是同时使用Erlang/OTP 23Elixir 1.9.4的问题。

Elixir 1.9OTP 23,但是 fully leverages OTP, so it relies on some warnings/messages coming from 编译器编译期间。

就是说,将 OTP 降级到版本 Elixir 1.9 是知道的(21 会很好,我相信, ) Elixir 升级到最近的 1.11.1 将解决生成 fancy

的问题
== Compilation error in file /tmp/test.ex ==
** (CompileError) /tmp/test.ex:3: undefined function do_addition_problems/1
    (elixir 1.11.1) src/elixir_locals.erl:114: anonymous fn/3 in :elixir_locals.ensure_no_undefined_local/3
    (stdlib 3.13.2) erl_eval.erl:680: :erl_eval.do_apply/6