Skip to content

Commit

Permalink
replaced usages of expand_alias with current_module
Browse files Browse the repository at this point in the history
  • Loading branch information
scohen committed Jan 18, 2024
1 parent 434387f commit 2003e20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ defmodule Lexical.RemoteControl.Search.Indexer.Extractors.FunctionDefinition do
when is_atom(fn_name) and definition in @function_definitions do
range = get_definition_range(reducer.analysis, metadata, body)

{:ok, module} =
RemoteControl.Analyzer.expand_alias([:__MODULE__], reducer.analysis, range.start)
{:ok, module} = RemoteControl.Analyzer.current_module(reducer.analysis, range.start)

arity =
case args do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule Lexical.RemoteControl.AnalyzerTest do

assert %Analysis{valid?: false} = analysis = Ast.analyze(document)
assert %Analysis{valid?: true} = analysis = Ast.reanalyze_to(analysis, position)
assert {:ok, Invalid} = Analyzer.expand_alias([:__MODULE__], analysis, position)
assert {:ok, Invalid} = Analyzer.current_module(analysis, position)
end
end
end

0 comments on commit 2003e20

Please sign in to comment.