[Issue 13816] [REG2.066.0] The compiler crashes with recursive tuple expansion

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 10 09:26:58 PDT 2015


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
           Hardware|x86_64                      |All
            Summary|The compiler crashes with   |[REG2.066.0] The compiler
                   |getProtection trait         |crashes with recursive
                   |                            |tuple expansion
                 OS|Mac OS X                    |All
           Severity|blocker                     |regression

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
It's a regression from 2.066.0.

Reduced test case:

alias TypeTuple(T...) = T;

template ItemProperty()
{
    static if (true)
    {
        alias ItemProperty = TypeTuple!(ItemProperty!());  // line 14
    }
}
void main()
{
    alias items = ItemProperty!();  // line 19

    enum num = items.length;        // line 21
}

Until 2.065, the code had printed:

test.d(14): Error: alias test.ItemProperty!().ItemProperty recursive alias
declaration
test.d(19): Error: template instance test.ItemProperty!() error instantiating

But since 2.066, line 19 makes no error, and line 21 will crash the compiler.

--


More information about the Digitalmars-d-bugs mailing list