[Issue 14146] New: [REG2.067a] ICE with non-empty default constructor in struct

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Feb 7 20:02:41 PST 2015


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

          Issue ID: 14146
           Summary: [REG2.067a] ICE with non-empty default constructor in
                    struct
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: sinkuupump at gmail.com

Compiling the code below causes ICE. This is a regression introduced in
https://github.com/D-Programming-Language/dmd/pull/4281

struct RangeT(A)
{
    A[1] outer;
}

struct Array
{
    this()
    {
    }

    alias Range = RangeT!Array;

    bool opEquals(Array)
    {
    }
}


% dmd -c t.d
t.d(8): Error: constructor t.Array.this default constructor for structs only
allowed with @disable and no body
dmd: template.c:2593: FuncDeclaration*
TemplateDeclaration::doHeaderInstantiation(TemplateInstance*, Scope*,
FuncDeclaration*, Type*, Expressions*): Assertion `fd->type->ty == Tfunction'
failed.

--


More information about the Digitalmars-d-bugs mailing list