https://issues.dlang.org/show_bug.cgi?id=13587
Issue ID: 13587
Summary: Symbols In Template Mixin Conflict Across Modules
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
Referencing symbols defined in a template mixin causes a "conflict" error (see
below) when mixin is used in several modules:
// ModuleA.d
module ModuleA;
import ModuleB;
mixin MixinUsefulStuff;
pragma(msg, "a = ", SomeData.a); // Error: ModuleB.MixinUsefulStuff!().SomeData
at ModuleB.d(5) conflicts with ModuleA.MixinUsefulStuff!().SomeData at
ModuleB.d(5)
// ModuleB.d
module ModuleB;
mixin template MixinUsefulStuff()
{
struct SomeData
{
enum a = 123;
}
}
mixin MixinUsefulStuff;
--