[Issue 11330] Directory named as imported module should not stop module search

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 26 14:02:12 PDT 2013


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


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|                            |WONTFIX


--- Comment #7 from Walter Bright <bugzilla at digitalmars.com> 2013-10-26 14:02:10 PDT ---
1. The compiler has always relied on a "first found" algorithm when searching
the import paths. That's like using nested scopes when searching for a symbol.
This is a valuable feature as it allows for overriding (and I use this,
especially when debugging). There's a clear hierarchy of this. (The
anti-hijacking support in D comes into play for cases where there is no clear
hierarchy.)

2. The import system is designed to map onto the file system. Using
file/directory names that match module/package names is how it is supposed to
work, if there are matching names that have nothing to do with D will cause
problems.

I don't see any reasonable resolution for the regression issue you identified.
The only thing I can think of is don't name things with the same names as D
modules/packages when they are in the import path.

I'm going to resolve as wontfix for now. If a workable solution appears, please
reopen.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list