[Issue 15086] import doesn't verify module declaration

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 12 23:09:55 UTC 2018


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

Jonathan Marler <johnnymarler at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johnnymarler at gmail.com

--- Comment #6 from Jonathan Marler <johnnymarler at gmail.com> ---
Note that there are 3 names to consider for every import.

1. The import name
2. The file name
3. The module name

This issue addresses the case where the import name matches the filename, but
does not match the module name.

> Note that it does not cover the case where the import matches the module name but does not match the filename (a case I think is useful).

The problem is that this is an error when all the modules are compiled
together, but the error disappears if you compile the modules seperately. This
puts a coupling between the module system and how the source files are
compiled, and adds support for an odd use case that has no utility.

--


More information about the Digitalmars-d-bugs mailing list