Bug 3069 – Issue 3069 - Array literals do not implicitly cast to void[]
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-06-15T02:05:00Z
Last change time
2015-06-09T05:10:41Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0 by dlang-bugzilla — 2009-06-15T02:05:49Z
=== Testcase ===
void main()
{
ubyte id;
void[] v = [id] ~ [id];
}
=== Compiler output ===
test.d(4): Error: cannot implicitly convert expression ([id,id]) of type ubyte[] to void[]
=== Testcase end ===
Adding [] after either [id] allows the code to compile.
This is probably related to #3068, if it isn't actually the same bug...