From 3dfdd80dff28cfaaa3753166cdeee78a2f5c13a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 12 Jan 2020 16:25:02 +0100 Subject: [PATCH] Make sure to traverse args in xref --- lib/mix/lib/mix/tasks/xref.ex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/mix/lib/mix/tasks/xref.ex b/lib/mix/lib/mix/tasks/xref.ex index 2094939e81..eede49d978 100644 --- a/lib/mix/lib/mix/tasks/xref.ex +++ b/lib/mix/lib/mix/tasks/xref.ex @@ -229,15 +229,17 @@ defmodule Mix.Tasks.Xref do end # Mod.fun(...) - defp walk_expr({{:., meta, [module, fun]}, _, args}, state) + defp walk_expr({{:., _, [module, fun]}, meta, args}, state) when is_atom(module) and is_atom(fun) do - add_call(module, fun, length(args), meta, state) + state = add_call(module, fun, length(args), meta, state) + walk_expr(args, state) end # %Module{...} defp walk_expr({:%, meta, [module, {:%{}, _meta, args}]}, state) when is_atom(module) and is_list(args) do - add_call(module, :__struct__, 0, meta, state) + state = add_call(module, :__struct__, 0, meta, state) + walk_expr(args, state) end # Function call