view run/with_12.d @ 281:b8b7a330468a

with and opIndex Manfred Nowak <svv1999@hotmail.com> 2005-02-03 news:cttuih$hpb$1@digitaldaemon.com nntp://news.digitalmars.com/digitalmars.D.bugs/2852
author thomask
date Sat, 12 Feb 2005 10:24:24 +0000
parents
children a929acac9127
line wrap: on
line source

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

// @author@	Manfred Nowak <svv1999@hotmail.com>
// @date@	2005-02-03
// @uri@	news:cttuih$hpb$1@digitaldaemon.com
// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2852

module dstress.run.with_12;

struct Entry{
	int a;
}

int main(){
	Entry[10] table;

	assert(table[1].a==0);
	with( table[1]){
		a=1;
	}
	assert(table[1].a==1);

	return 0;
}