D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12061 - Refused array append with struct with void field
Summary: Refused array append with struct with void field
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2014-02-02 08:06 UTC by bearophile_hugs
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2014-02-02 08:06:57 UTC
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 Kenji Hara 2014-02-02 15:39:52 UTC
Same error occurs with 2.057-2.064,
Comment 2 basile-z 2019-02-13 02:50:54 UTC
works since 2.067.1