view run/inline_05.d @ 1383:52c9e86b6486

@url@ -> @uri@
author thomask
date Sun, 04 Mar 2007 13:07:35 +0000
parents 38499bb7a5a2
children d3a3e0c251d8
line wrap: on
line source

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

// @author@	Ilya Zaitseff <sark7@mail333.com>
// @date@	2005-02-14
// @uri@	news:opsl6xtajtaaezs2@robingood
// @uri@	nntp://news.digitalmars.com/digitalmars.D.bugs/2984

module dstress.run.inline_05;

struct MyStruct{

	int[] x;

	int foo() {
		return 3;
	}

	MyStruct bar(){
		MyStruct v;
		foreach (inout int f; v.x){
			f=0;
		}
		return v;
	}
	
	float bug(MyStruct p1) {
		return bar.foo;
	}
}

int main(){
	MyStruct s;
	assert(s.bug(s)==3);
	return 0;
}