view run/s/struct_initialization_12_C.d @ 1558:d40d75fcd5c5

[Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly Matti Niemenmaa <deewiant@gmail.com> 2007-06-15 http://d.puremagic.com/issues/show_bug.cgi?id=1268
author thomask
date Mon, 23 Jul 2007 18:47:01 +0000
parents
children
line wrap: on
line source

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

// @author@	Matti Niemenmaa <deewiant@gmail.com>
// @date@	2007-06-15
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1268
// @desc@	[Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly

module dstress.run.s.struct_initialization_12_C;

typedef int I = 13;

struct S{
	I[5] x;
}

int main(){
	S s;
	for(size_t i = 0; i < 5; i++){
		if(13 != s.x[i]){
			assert(0);
		}
	}
	return 0;
}