[Issue 4066] ICE(e2ir.c): enum AA get

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 28 10:06:17 PST 2010


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


Denis Derman <denis.spir at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |denis.spir at gmail.com


--- Comment #2 from Denis Derman <denis.spir at gmail.com> 2010-11-28 10:04:51 PST ---
A use case, where issue happens with 'static' instead of 'enum:

enum string[string] escapeCodes = ["\n":"\\n", "\t":"\\t"]; // and many more
string escape(string s0) {
    auto s1 = s0;
    foreach (c,s ; escapeCodes)
        s1 = s1.replace(c,s);
    return s1;
}
==>
Internal error: e2ir.c 4629

Only tried to use this because it seems impossible to have a func-static AA:
__trials__.d(16): Error: non-constant expression ["\x0a":"\\n","\x09":"\\t"]

Denis

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