http://d.puremagic.com/issues/show_bug.cgi?id=4934
Summary: Cannot compile an overloaded operator returning by ref Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: samu...@voliacable.com --- Comment #0 from Max Samukha <samu...@voliacable.com> 2010-09-24 07:35:00 PDT --- struct QString { ref QString opOpAssign(string op : "+")(ref QString s) { return this; } } void main() { QString s; s += s; // fails s.opOpAssign!("+")(s); // compiles } test.d(12): Error: variable test.QString.op only parameters or foreach declarations can be ref Compiles if the return type is omitted or the operator is called explicitly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------