diff --git a/apps/remote_control/lib/lexical/remote_control/search/indexer/extractors/function_definition.ex b/apps/remote_control/lib/lexical/remote_control/search/indexer/extractors/function_definition.ex index 3a70ae1fc..b18e34203 100644 --- a/apps/remote_control/lib/lexical/remote_control/search/indexer/extractors/function_definition.ex +++ b/apps/remote_control/lib/lexical/remote_control/search/indexer/extractors/function_definition.ex @@ -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 diff --git a/apps/remote_control/test/lexical/remote_control/analyzer_test.exs b/apps/remote_control/test/lexical/remote_control/analyzer_test.exs index 1edf3e522..5502f4bd0 100644 --- a/apps/remote_control/test/lexical/remote_control/analyzer_test.exs +++ b/apps/remote_control/test/lexical/remote_control/analyzer_test.exs @@ -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