Bug 12587 – Ommiting type when auto declaration in static members results in error

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-16T09:10:34Z
Last change time
2020-03-21T03:56:40Z
Assigned to
No Owner
Creator
Temtaime

Comments

Comment #0 by temtaime — 2014-04-16T09:10:34Z
struct S { this(int) { } static immutable s = S(12); } void main() { } Error: cannot create a struct until its size is determined If static immutable s = S(12) changed to static immutable S s = S(12) compiles ok.