[Issue 2881] x.stringof returns typeof(x).stringof when x is an enum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 13 08:38:29 PST 2010


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


nfxjfg at gmail.com changed:

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


--- Comment #1 from nfxjfg at gmail.com 2010-01-13 08:38:27 PST ---
This bug is a blocker for me. Here's a trivial patch that fixes it.
Note that the stringof functionality in getProperty() isn't called; it just
isn't needed and produces the wrong result.
Dear Walter, if you don't accept this patch, pretty please state this clearly
(instead of just not commenting it).

It's against dmd 1.053 (1.054/55 don't work for me because of other bugs).

--- a/mtype.c
+++ b/mtype.c
@@ -3888,7 +3888,7 @@ Expression *TypeEnum::dotExp(Scope *sc, Expression *e,
Identifier *ident)
        if (ident == Id::max ||
            ident == Id::min ||
            ident == Id::init ||
-           ident == Id::stringof ||
+           //ident == Id::stringof ||
            !sym->memtype
           )
        {

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