view run/b/bug_type_308_F.d @ 1597:8b9d4d2f925a

Fix typos in complex tests. See D bug 614.
author Christian Kamm <kamm incasoftware de>
date Tue, 09 Sep 2008 16:53:58 +0200
parents daef239f37cf
children
line wrap: on
line source

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

// @author@	<godaves@yahoo.com>
// @date@	2006-06-27
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=227

module dstress.run.b.bug_type_308_F;

struct S{
	int i;

	S foo(int x){
		S s;

		s.i = x;

		return s;
	}
}

int main(){
	S[] s;
	S y;

	s = s ~ y.foo(6);
	s = s ~ y.foo(1);

	if(s.length != 2){
		assert(0);
	}
	if(s[0].i != 6){
		assert(0);
	}
	if(s[1].i != 1){
		assert(0);
	}

	return 0;
}