digitalmars.D.bugs - no property 'length' for type 'int' - no file/line number
- Regan Heath (33/33) Mar 18 2005 see subject, test code:
- Regan Heath (8/8) Mar 18 2005 Shortened test case:
see subject, test code: import std.stdio; void main() { static int[] array1 = [0,1,2,3]; //writefln("array1.init = ",typeid(typeof(array1.init))); //Error: array initializers as expressions are not allowed writefln("array1[].init = ",typeid(typeof(array1[].init))); writefln("array1.length = ",array1.length); writefln("array1[].init.length = ",array1[].init.length); static int[4] array2 = [4,5,6,7]; //writefln("array2.init = ",typeid(typeof(array2.init))); //Error: array initializers as expressions are not allowed writefln("array2[].init = ",typeid(typeof(array2[].init))); writefln("array2.length = ",array2.length); writefln("array2[].init.length = ",array2[].init.length); int[] array3; writefln("array3.init = ",typeid(typeof(array3.init))); writefln("array3[].init = ",typeid(typeof(array3[].init))); writefln("array3.length = ",array3.length); writefln("array3.init.length = ",array3.init.length); writefln("array3[].init.length = ",array3[].init.length); int[4] array4; writefln("array4.init = ",typeid(typeof(array4.init))); writefln("array4[].init = ",typeid(typeof(array4[].init))); writefln("array4.length = ",array4.length); writefln("array4.init.length = ",array4.init.length); writefln("array4[].init.length = ",array4[].init.length); } Regan
Mar 18 2005
Shortened test case: import std.stdio; void main() { int[4] array4; writefln("array4.init.length = ",array4.init.length); } Regan
Mar 18 2005