Skip to content

Commit 3dfdd80

Browse files
author
José Valim
committed
Make sure to traverse args in xref
1 parent 0fdc751 commit 3dfdd80

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/mix/lib/mix/tasks/xref.ex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,17 @@ defmodule Mix.Tasks.Xref do
229229
end
230230

231231
# Mod.fun(...)
232-
defp walk_expr({{:., meta, [module, fun]}, _, args}, state)
232+
defp walk_expr({{:., _, [module, fun]}, meta, args}, state)
233233
when is_atom(module) and is_atom(fun) do
234-
add_call(module, fun, length(args), meta, state)
234+
state = add_call(module, fun, length(args), meta, state)
235+
walk_expr(args, state)
235236
end
236237

237238
# %Module{...}
238239
defp walk_expr({:%, meta, [module, {:%{}, _meta, args}]}, state)
239240
when is_atom(module) and is_list(args) do
240-
add_call(module, :__struct__, 0, meta, state)
241+
state = add_call(module, :__struct__, 0, meta, state)
242+
walk_expr(args, state)
241243
end
242244

243245
# Function call

0 commit comments

Comments
 (0)