Skip to content

Commit 145ca7a

Browse files
committed
pass correct state to macro expander
1 parent 3c659df commit 145ca7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/elixir_sense/core/compiler.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -768,12 +768,12 @@ defmodule ElixirSense.Core.Compiler do
768768
{:macro, module, callback} ->
769769
# NOTE there is a subtle difference - callback will call expander with state derived from env via
770770
# :elixir_env.env_to_ex(env) possibly losing some details. Jose Valim is convinced this is not a problem
771-
state =
772-
state
771+
state_l =
772+
state_l
773773
|> State.add_call_to_line({module, fun, length(args)}, meta)
774774
|> State.add_current_env_to_line(meta, env)
775775

776-
expand_macro(meta, module, fun, args, callback, state, env)
776+
expand_macro(meta, module, fun, args, callback, state_l, env)
777777

778778
:error ->
779779
expand_remote(module, dot_meta, fun, meta, args, state, state_l, env)

0 commit comments

Comments
 (0)