[Issue 5354] formatValue: range templates introduce 3 bugs related to class & struct cases

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 20 10:11:50 PDT 2011


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


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #18 from Kenji Hara <k.hara.pg at gmail.com> 2011-10-20 10:10:38 PDT ---
We can check the toString method is overridden like follows:

string delegate() dg = &obj.toString;
auto overridden = dg.funcptr != &Object.toString;

https://github.com/D-Programming-Language/phobos/pull/298

For class range objects, if the toString method is actually overridden, use it.

-- 
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