Bug 12061 – Refused array append with struct with void field

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-02-02T08:06:57Z
Last change time
2020-03-21T03:56:38Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-02-02T08:06:57Z
struct Foo { int a = void; } void main() { Foo[] arr; arr ~= Foo(); } dmd 2.065.0b2 gives me: ...>dmd -O test.d test.d(4): Error: variable _TMP0 used before set
Comment #1 by k.hara.pg — 2014-02-02T15:39:52Z
Same error occurs with 2.057-2.064,
Comment #2 by b2.temp — 2019-02-13T02:50:54Z
works since 2.067.1