I got an error due to a typo, but the message is weird. Error message is missing context like line no, etc
Is this a bug or can the message be improved?
Erlang/OTP 25 [erts-13.1.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]
Elixir 1.14.1 (compiled with Erlang/OTP 25)
== Compilation error in file lib/test_module.ex ==
** (CompileError) lib/test_module.ex:2: cannot invoke remote function :elixir_module.read_cache/2 inside a match
(elixir 1.14.1) expanding macro: Kernel.def/2
lib/test_module.ex:2: TestError (module)
Below is the code which causes the error.
defmodule TestError do
def x() do
1
end
= # <- is causing the error message
def y() do
2
end
end