[Issue 14147] Compiler crash on identical functions in a single module

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Feb 8 02:28:38 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14147

Ketmar Dark <ketmar at ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar at ketmar.no-ip.org

--- Comment #1 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
seems that this assert() is right, and the code in
`StructDeclaration::semantic()` is missing one check.

here we have a check for the same condition:

    if (type->ty == Tstruct && ((TypeStruct *)type)->sym != this)
    {
        TemplateInstance *ti = ((TypeStruct *)type)->sym->isInstantiated();
        if (ti && isError(ti))
            ((TypeStruct *)type)->sym = this;
    }

seems that second `if` is missing `else` part with `error()`.

--


More information about the Digitalmars-d-bugs mailing list