Bug 8117 – Cannot initialize struct member without default constructor
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-05-18T17:02:00Z
Last change time
2013-11-30T09:09:43Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
wfunction
Comments
Comment #0 by wfunction — 2012-05-18T17:02:05Z
struct S
{
@disable this();
this(int) { }
}
class T { S s = S(1); }
void main() { new T(); }
Error: default construction is disabled for type T
^ wat?
Why is it looking for a default constructor?