Bug 7673 – Static variables do not allow implicit call to ctor via assignment
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-08T11:05:00Z
Last change time
2012-12-02T11:17:18Z
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2012-03-08T11:05:59Z
struct Foo
{
this(bool) { }
}
void main()
{
Foo foo = false; // ok
static Foo foo = false; // NG
}
I don't know whether the first case is actually a feature. But if it is, the second one should be allowed as well.
Comment #1 by andrej.mitrovich — 2012-12-02T11:17:18Z