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.
Comment #1 by kennytm — 2012-02-15T06:37:10Z
Comment #2 by github-bugzilla — 2012-02-18T12:41:11Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/97cda9f789b36afb6a790b8219aade3d6ce21946 Merge pull request #723 from kennytm/bug7504_null_array Bug 7504: Cannot assign an object of type 'typeof(null)' to an array
Comment #3 by github-bugzilla — 2013-10-08T20:55:21Z