Bug 14405 – Private class std.typecons.Foo conflicts with local class

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-04-04T12:22:00Z
Last change time
2015-11-07T12:55:05Z
Assigned to
nobody
Creator
ryan

Comments

Comment #0 by ryan — 2015-04-04T12:22:13Z
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
Comment #1 by dlang-bugzilla — 2015-04-05T04:21:35Z
Underlying cause is issue 1238
Comment #2 by dlang-bugzilla — 2015-04-05T04:27:47Z
Comment #3 by ryan — 2015-11-07T12:55:05Z