[Issue 453] When importing modules compiler can not distinguish between directory and file

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 25 16:22:28 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=453





------- Comment #4 from digitalmars-com at baysmith.com  2006-10-25 18:22 -------
(In reply to comment #3)
> Cannot fix because if name were both a module and a directory name,
> 
>     import name;
>     import name.foo;
> 
> the two uses of name could not be distinguished.
> 

Why is that? The documentation states the following:

The Identifier preceding the rightmost are the packages  that the module is in.
The packages correspond to directory names in the source file path.

Therefore, I would interpret the first import statement as importing the module
name, and the second import statement as importing the module foo in the
package name.

Can't packages be distinguished from modules?


-- 




More information about the Digitalmars-d-bugs mailing list