[Issue 1640] Can't slice array literal directly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 4 10:27:54 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1640





------- Comment #1 from aziz.kerim at gmail.com  2007-11-04 12:27 -------
The array literal is parsed as an array initializer (which must be followed by
a semicolon.) You can work around this quite easily:

int[] foo = ([1,2,3])[0..1];


-- 



More information about the Digitalmars-d-bugs mailing list