Bug 5008 – Bizarre "conflicts with __anonymous at" error with regex and indirectly imported phobos

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-10-07T01:06:00Z
Last change time
2015-06-09T05:11:39Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bus_dbugzilla

Comments

Comment #0 by bus_dbugzilla — 2010-10-07T01:06:58Z
Not sure if this is a bug in DMD or Phobos: ----------------- module a; import std.regex; import b; void main() { replace("hello", regex("X"), "Y"); } ----------------- module b; public import std.string; public import std.array; ----------------- > dmd a.d b.d Result: ----------------- a.d(7): Error: std.regex.replace(Range,Engine,String) if (is(Unqual!(Engine) == Regex!(Unqual!(typeof(Range.init[0]))))) at D:\DevTool\dmd\bin\..\src\phobos\std\regex.d(2807) conflicts with __anonymous at -----------------
Comment #1 by code — 2012-02-14T06:04:30Z
cat > a.d << CODE module a; import std.regex; import b; void main() { replace("hello", regex("X"), "Y"); } CODE cat > b.d << CODE module b; public import std.string; public import std.array; CODE dmd -c a.d b.d