-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module file name mismatch compiler error not exposed #1152
Comments
Interesting, thanks for the report. I never noticed this since Emacs' Erlang mode already prevents that. |
Confirmed from the code in OTP. The error is only emitted if a binary is saved, which doesn't happen in the case of |
Should this be a "bug" report to OTP, in that the compiler doesn't validate this? I assume it's hard coded somewhere else in the Erlang compiler stack then, because I guess it's not strictly seen as an error, because you can produce beam files with whatever |
[#1152] Emit error in case the module name does not coincide with the filename
Describe the bug
A module with a name not matching the file name does issue an error.
To Reproduce
Create a module in the file
foo.erl
:Expected behavior
An error similar to the Erlang compilation error should be issued:
Actual behavior
No error is visible.
Context
erlang_ls
version (tag/sha): 0.21.1The text was updated successfully, but these errors were encountered: