[Issue 17837] Static array initializers longer than array length should not be allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 18 06:22:19 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17837

b2.temp at gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com

--- Comment #1 from b2.temp at gmx.com ---
Yes but your example is not a static array initializer. This is a simple
non-void initializer that consists of an unary expression converted at
run-time.

Better example:

char[2] str = ['0','1','2'];

And actually this is already static cally checked.

--


More information about the Digitalmars-d-bugs mailing list