Describe the bug
If ?MODULE is used in a function defined in a header file there will be a compilation error diagnostic when viewing that file, and a warning in any file that includes that file.
To Reproduce
Create a foo.erl:
-module(foo).
-include("foo.hrl").
And a foo.hrl:
-export([f/0]).
f() -> ?MODULE.
Which is accepted by Erlang:
1> c(foo).
{ok,foo}
2> foo:f().
foo
Expected behaviorerlang_ls does not generate any compiler warnings.
Describe the bug If
?MODULE
is used in a function defined in a header file there will be a compilation error diagnostic when viewing that file, and a warning in any file that includes that file.To Reproduce Create a
foo.erl
:And a
foo.hrl
:Which is accepted by Erlang:
Expected behavior
erlang_ls
does not generate any compiler warnings.Actual behavior
Context
erlang_ls
version (tag/sha):Version: 0.51.0