Skip to content

Commit b08657c

Browse files
committed
Skip apply on traversal
1 parent c151f61 commit b08657c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/elixir/lib/module/types/expr.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,11 @@ defmodule Module.Types.Expr do
461461
{args_types, context} =
462462
Enum.map_reduce(args, context, &of_expr(&1, @pending, &1, stack, &2))
463463

464-
Apply.fun_apply(fun_type, args_types, call, stack, context)
464+
if stack.mode == :traversal do
465+
{dynamic(), context}
466+
else
467+
Apply.fun_apply(fun_type, args_types, call, stack, context)
468+
end
465469
end
466470

467471
def of_expr({{:., _, [callee, key_or_fun]}, meta, []} = call, expected, expr, stack, context)

0 commit comments

Comments
 (0)