Bug 7504 – Cannot assign an object of type 'typeof(null)' to an array
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-15T03:50:00Z
Last change time
2013-10-08T20:55:21Z
Keywords
pull
Assigned to
nobody
Creator
kennytm
Comments
Comment #0 by kennytm — 2012-02-15T03:50:59Z
Test case:
void test7504()
{
auto n = null;
char[] k = n; // even 'cast(char[])n' won't work.
}
Note that this goes against bug 3889, but [] doesn't work either because it is of type 'void[]' (see bug 5416), although 'cast(char[])emptyArray' would work in that case.