D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5008 - Bizarre "conflicts with __anonymous at" error with regex and indirectly imported phobos
Summary: Bizarre "conflicts with __anonymous at" error with regex and indirectly impor...
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2010-10-07 01:06 UTC by Nick Sabalausky
Modified: 2015-06-09 05:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nick Sabalausky 2010-10-07 01:06:58 UTC
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 Martin Nowak 2012-02-14 06:04:30 UTC
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