https://issues.dlang.org/show_bug.cgi?id=14405
Issue ID: 14405
Summary: Private class std.typecons.Foo conflicts with local
class
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: [email protected]
Reporter: [email protected]
There is a private class named Foo defined in std.typecons (currently line
3091) that can conflict with a user-defined class when unittest is enabled.
--- file foo.d
module foo;
class Foo { }
---
--- file fail.d
import std.typecons;
import foo;
unittest { auto f = new Foo; }
---
rdmd -unittest -main fail.d
fail.d(5): Error: std.typecons.Foo at
/usr/include/dlang/dmd/std/typecons.d(2892) conflicts with foo.Foo at foo.d(2)
fail.d(5): Error: module fail class std.typecons.Foo is private
--