Bug 10994 – [REG] cannot declare statics struct with void-initialized static arrays

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-08T01:57:00Z
Last change time
2013-09-16T15:28:03Z
Keywords
CTFE
Assigned to
nobody
Creator
monarchdodra

Comments

Comment #0 by monarchdodra — 2013-09-08T01:57:03Z
//---- struct T { int i = void; //OK int* p = void; //OK int[] slice = void; //OK ubyte[2] buf = void; //NOPE } static t = T.init; //---- 2.063.2: OK! v2.064-devel: main.d(8): Error: uninitialized variable 'buf' cannot be returned from CTFE main.d(8): Error: uninitialized variable 'buf' cannot be returned from CTFE
Comment #1 by clugdbug — 2013-09-16T00:57:11Z
Comment #2 by github-bugzilla — 2013-09-16T14:02:03Z