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


Kenji Hara <k.hara...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.hara...@gmail.com


--- Comment #2 from Kenji Hara <k.hara...@gmail.com> 2011-06-20 02:17:53 PDT ---
Trivial fix of sample code:
----
struct Foo
{
    int x;

    ref Foo opOpAssign(string op)(ref Foo f) if(op == "+")  // <- "+="
    {
        x += f.x;
        return this;
    }
}
void main()
{
    Foo f1 = Foo(1);
    Foo f2 = Foo(2);
    f2 += f1;
}
----

And, on dmd 2.054 (d36b3b12fc4814e59f3a0d680b8700e787b1ceff) this code has
passed to compile.

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

Reply via email to