[Issue 15086] import doesn't verify module declaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 13 20:10:14 UTC 2018


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

ag0aep6g at gmail.com changed:

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

--- Comment #14 from ag0aep6g at 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

--


More information about the Digitalmars-d-bugs mailing list