You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test "find references of variables in arguments" do
buffer = """
defmodule MyModule do
def call(conn) do
if true do
conn
end
end
end
"""
references = ElixirSense.references(buffer, 2, 13)
assert references == [
%{range: %{end: %{column: 16, line: 2}, start: %{column: 12, line: 2}}, uri: nil},
%{range: %{end: %{column: 11, line: 4}, start: %{column: 7, line: 4}}, uri: nil},
]
# returns []
end
The reason is broken variable tracking in MetadataBuilder.State. new_func_vars_scope works differently from new_vars_scope - it does not increment the scope_id counter and thanks to that conn variable is not in the function scope. The second problem is subscope handling. When leaving a subscope in remove_vars_scope all subscope variable positions are lost.
The text was updated successfully, but these errors were encountered:
The following test fails
The reason is broken variable tracking in MetadataBuilder.State. new_func_vars_scope works differently from new_vars_scope - it does not increment the scope_id counter and thanks to that conn variable is not in the function scope. The second problem is subscope handling. When leaving a subscope in remove_vars_scope all subscope variable positions are lost.
The text was updated successfully, but these errors were encountered: