https://issues.dlang.org/show_bug.cgi?id=15086

ag0ae...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #14 from ag0ae...@gmail.com ---
Reopening. INVALID is not an acceptable resolution for this.

Per the spec, a module must be imported by its module name [1]. And the module
name is set by the module declaration, if there is one [2]. Importing a module
by its file name is not in the spec. Of course, I may be missing how the spec
allows DMD's current behavior. If so, someone please point it out.

If I'm not missing anything in the spec, this issue (like all compiler bugs)
can be resolved by changing the compiler to match the spec, or by changing the
spec to match the compiler. It could also be closed as WONTFIX, I guess. But
that would be disappointing. DMD and the spec should agree on the rules.


[1] https://dlang.org/spec/module.html#import-declaration
[2] https://dlang.org/spec/module.html#module_declaration

--

Reply via email to