www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14146] New: [REG2.067a] ICE with non-empty default


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

Compiling the code below causes ICE. This is a regression introduced in

struct RangeT(A)
    A[1] outer;

struct Array

    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'

Feb 07 2015