www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3134] New: Conflicting Class Names Permitted From Imported File

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3134

           Summary: Conflicting Class Names Permitted From Imported File
           Product: D
           Version: 1.043
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: cbkbbejeap mailinator.com


This compiles but should not:

--------------------
module main;
import inc;

class Foo {}
void main()
{
    auto f = new Foo();
}
--------------------
module inc;
class Foo {}
--------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 03 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3134


dawg dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dawg dawgfoto.de
         Resolution|                            |INVALID


--- Comment #1 from dawg dawgfoto.de 2012-02-12 19:00:21 PST ---
Symbols defined in a module have precedence over imported symbols.
You will only get an error if Foo was declared in two different imported
modules.

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