(In reply to kinke from comment #1)
> I just glanced at the code, but it appears invalid (specifically,
> emplaceRef() for a 0-sized T), see https://github.com/dlang/phobos/pull/6480.
Disregard, there's no 0-sized type in there, and DMD obviously shouldn't crash anyway.
Comment #3 by slavo5150 — 2018-05-20T14:47:05Z
I can reproduce this at run.dlang.io, but I can't reproduce it locally from DMD-Head (Linux 64-bit). DMD-Head gives me this:
main.d(19): Error: false has no effect
main.d(34): Error: template instance `main.emplaceInitializer!(S)` error instantiating
main.d(24): instantiated from here: emplaceRef!(Problem[4])
main.d(15): instantiated from here: emplaceRef!(Problem[4], Problem)
Comment #4 by ag0aep6g — 2018-05-20T21:12:23Z
(In reply to Mike Franklin from comment #3)
> I can reproduce this at run.dlang.io, but I can't reproduce it locally from
> DMD-Head (Linux 64-bit).
I can reproduce it just fine on Linux with DMD64 D Compiler v2.080.0-166-g235e5b500 (i.e. git master).
Crashes with:
core.exception.AssertError@dmd/dinterpret.d(4834): Assertion failure
That's here: <https://github.com/dlang/dmd/blob/235e5b50052b3910fec36cb949cc43502267ea82/src/dmd/dinterpret.d#L4834>.
Also, reduced test case:
----
struct Problem
{
~this() {}
}
struct S
{
Problem[1] payload;
}
enum theTemplateB = {
static foreach (e; S.init.tupleof) {}
return true;
}();
----