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


timon.g...@gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timon.g...@gmx.ch


--- Comment #2 from timon.g...@gmx.ch 2012-01-21 18:35:23 PST ---
1. The static if in the function body is not required. You can return a void
expression from a void function.
2. Here is what still does not work:

class C{
    void concatAssign(C other) { }
    void concatAssign(short other) { }
    void concatAssign(short[] other) { }

    auto ref opOpAssign(string s, T)(T t) if (s == "~"){
        return concatAssign(t);
    }
}

void main()
{
    auto c = new C;
    c.opOpAssign!"~"(c); // works
    c.opOpAssign!"~"(1); // no go
    c ~= 1;              // no go
    c ~= [1,2,3];        // no go

    // (compare to)
    short[] s;
    s ~= 1;       // works
    s ~= [1,2,3]; // works
}

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

Reply via email to