www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Error: array initializers as expressions are not allowed - no file/line numbers

reply "Regan Heath" <regan netwin.co.nz> writes:
The subject says it all. Test code:

import std.stdio;

void main()
{
	static int[]  array1 = [0,1,2,3];
	static int[4] array2 = [4,5,6,7];
	
	writefln(typeid(typeof(array1.init)));
	writefln(typeid(typeof(array1[].init)));
	writefln(typeid(typeof(array2.init)));
	writefln(typeid(typeof(array2[].init)));
}

Regan
Mar 18 2005
parent "Regan Heath" <regan netwin.co.nz> writes:
Shortened test case:

import std.stdio;

void main()
{
	static int[4] array2 = [5,6,7,8];		
	writefln("array2.init = ",typeid(typeof(array2.init)));
}

Regan
Mar 18 2005