While playing with the code here, I encountered an issue in decorate_arg function -
|
if elem(arg_ast, 0) == :\\ do |
Looks like if there is pattern matching like
deftraceable foo(_, 0) do
:error
end
This line throws an error -
== Compilation error in file tracer_test.exs ==
** (ArgumentError) errors were found at the given arguments:
* 2nd argument: not a tuple
:erlang.element(1, 0)
tracer.exs:55: Tracer.decorate_args/1
(elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
tracer.exs:50: Tracer.decorate_args/1
tracer_test.exs:6: (module)
I had to make below change to make the code work -
if is_tuple(arg_ast) and elem(arg_ast, 0) == :\\ do
While playing with the code here, I encountered an issue in
decorate_argfunction -apex/lib/apex/awesome_def.ex
Line 57 in ca3cfbc
Looks like if there is pattern matching like
This line throws an error -
I had to make below change to make the code work -
if is_tuple(arg_ast) and elem(arg_ast, 0) == :\\ do