Bug 10385 – Colision with module symbols when declared private

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-16T11:53:00Z
Last change time
2015-06-09T05:14:42Z
Assigned to
nobody
Creator
monarchdodra

Comments

Comment #0 by monarchdodra — 2013-06-16T11:53:59Z
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.
Comment #1 by k.hara.pg — 2013-06-16T20:56:41Z
*** This issue has been marked as a duplicate of issue 10375 ***