[Issue 934] Segfault taking mangleof a forward reference in a template.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 19 23:55:19 PDT 2009


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


clugdbug at yahoo.com.au changed:

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




------- Comment #3 from clugdbug at yahoo.com.au  2009-04-20 01:55 -------
PATCH: DMD2.028 on mytype.c line 1272, replace assert(deco); with:
        if (!deco) {
                error(loc, ".mangleof forward reference");
                return new StringExp(loc, "ERROR", 5, 'c');
        }
        ---
I was surprised to find that in most cases, this error doesn't appear -- seems
the compiler absorbs the error and retries in the next semantic pass, and then
the code works correctly. In other words, it completely fixes the bug in D2.


More information about the Digitalmars-d-bugs mailing list