[Issue 2028] Can't create template class in module of same name

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 22 01:36:17 PST 2012


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


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|                            |INVALID


--- Comment #6 from Walter Bright <bugzilla at digitalmars.com> 2012-01-22 01:35:54 PST ---
The error you get is expected.

The statement:

    import a;

introduces the name 'a' into the current scope, where 'a' is a module name.
Names in the current scope are always searched before names in imported scopes.
Hence, the 'a' module name is found before 'a' the template.

a.a works because module 'a' is found, and then 'a' is looked up in the scope
of module 'a'.

This is how it is designed to work.

-- 
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