[Issue 3482] New: dmd: template.c:4017: Identifier* TemplateInstance::genIdent(): Assertion `0' failed.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 6 16:17:39 PST 2009


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

           Summary: dmd: template.c:4017: Identifier*
                    TemplateInstance::genIdent(): Assertion `0' failed.
           Product: D
           Version: 1.051
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: nfxjfg at gmail.com


--- Comment #0 from nfxjfg at gmail.com 2009-11-06 16:17:39 PST ---
The following (invalid) code produces an ICE:

void foo(T...)() {
    return "";
}
void main() {
    foo!(int, char)();
}

dmd: template.c:4017: Identifier* TemplateInstance::genIdent(): Assertion `0'
failed.

The 'return "";' is invalid code, because it's inside a function with void as
return type. (That's a recent change to dmd.) Apparently, instead of printing a
proper error message, something goes wrong.

Interestingly, the example above works when you change it to 'foo!(int)();',
and dmd will print what looks like a proper error message.

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