Bug 14146 – [REG2.067a] ICE with non-empty default constructor in struct

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-02-08T04:02:00Z
Last change time
2015-02-21T09:11:08Z
Keywords
ice, pull
Assigned to
nobody
Creator
sinkuupump

Comments

Comment #0 by sinkuupump — 2015-02-08T04:02:41Z
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.
Comment #1 by k.hara.pg — 2015-02-08T05:14:33Z
Comment #2 by github-bugzilla — 2015-02-08T08:15:08Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1a4f77da9b19cda4d245c56e9e3e3411ff2bace7 fix Issue 14146 - ICE with non-empty default constructor in struct More better implementation for issue 11916. https://github.com/D-Programming-Language/dmd/commit/e98f99cdd07dffb09fc57fdbf80173d1bb368892 Merge pull request #4391 from 9rnsr/fix14146 [REG2.067a] Issue 14146 - ICE with non-empty default constructor in struct
Comment #3 by github-bugzilla — 2015-02-21T09:11:08Z