view run/bug_20050128_B.d @ 564:e77e4444c170

partial metadata fix
author thomask
date Thu, 02 Jun 2005 15:42:31 +0000
parents ee9d62b2a74f
children 52c9e86b6486
line wrap: on
line source

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

// @author@	Nick <Nick_member@pathlink.com>
// @date@	2005-01-28
// @uri@	news:ctdtgj$30r$1@digitaldaemon.com
// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2784

module dstress.run.bug_20050128_B;

struct MyStruct{
	int i;
     
	void display(){
		assert(i==10);
	}
    
	void someFunc(){
		// We never call this function
		void bug(MyStruct[] array){
			// array[0].i = i+1; // Comment out this line and the bug goes away
		}
    
		assert(i==10);
		display();
		assert(i==10);
	}
}
    
int main(){
	MyStruct m;
	m.i = 10;
	assert(m.i==10);
	m.someFunc();
	assert(m.i==10);
	return 0;
}