view run/a/array_initialization_32_D.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 0428e69041c3
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	Dave <godaves@yahoo.com>
// @date@	2007-01-01
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=783
// @desc@	[Issue 783] Cannot use an array w/ const or variable index as new[] size argument.

module dstress.run.a.array_initialization_32_D;

const size_t[] arr = [ 1, 2 , 3 ];

const size_t i = 2;

int main(){
	int[] ar2;
	ar2 = new int[](arr[i]);

	if(3 != arr.length){
		assert(0);
	}

	return 0;
}