www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10385] New: Colision with module symbols when declared private

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

           Summary: Colision with module symbols when declared private
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com



Step one, create a module with a class called A:

//----
module A_module;

class A
{}
//----

Step two, import the module, and create a template with the parameter A:

--------
import A_module;

void foo(A)()
{}

void main()
{
    foo!int();
}
--------

This works, but here's the kicker: Make A private, and things blowup:
main.d(3): Error: module main A_module.A is private
main.d(8): Error: template instance main.foo!(int) error instantiating

This is strange behavior on many levels.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10385


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 10375 ***

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