[Issue 9235] Template mixin doesn't allow to mixin non-conflicting overloads

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 4 08:12:41 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9235



--- Comment #3 from Maksim Zholudev <maximzms at gmail.com> 2013-02-04 08:12:40 PST ---
Signature constraints are ignored also for structures:
-------------------
struct A
{
    void foo(string s)() if(s == "a") {}
}

struct B
{
    void foo(string s)() if(s == "b") {}
}

struct Foo
{
    A a;
    B b;
    alias a.foo foo;
    alias b.foo foo;
}

void main()
{
    Foo f;
    f.foo!"a"();
}
-------------------
test.d(16): Error: alias test.Foo.foo conflicts with alias test.Foo.foo at
test.d(15)
-------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list