[Issue 14739] Immutable alias to template triggers dmd assert

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jul 3 22:28:01 PDT 2015


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

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|regression                  |critical

--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to joeyemmons from comment #0)
> Assertion failure: 'type->ty != Tstruct || ((TypeStruct *)type)->sym ==
> this' on line 929 in file 'struct.c'

(In reply to Vladimir Panteleev from comment #2)
> https://github.com/D-Programming-Language/dmd/pull/1760
> https://github.com/D-Programming-Language/dmd/pull/2645
> https://github.com/D-Programming-Language/dmd/pull/3383

The root issue is in the template mangling process. Currently typeof(ta) and
typeof(tb) are angled to the same name S4main14__T4testVyii0Z4test, but I think
it's wrong - the given argument `a` and `b` should be mangled differently on
alias parameter.

And the issue has existed from the previous of 2.062, the generated executable
had silently corrupted. The added assertion is detecting the compiler internal
structure issue correctly today.

Downgrade to 'critical' issue.

--


More information about the Digitalmars-d-bugs mailing list