changeset 294:38499bb7a5a2

inline / foreach / struct Ilya Zaitseff <sark7@mail333.com> 2005-02-14 news:opsl6xtajtaaezs2@robingood nntp://news.digitalmars.com/digitalmars.D.bugs/2984
author thomask
date Sat, 19 Feb 2005 11:20:29 +0000
parents db3d94221144
children 28dd23a1080b
files run/inline_04.d run/inline_05.d run/inline_06.d
diffstat 3 files changed, 112 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/inline_04.d	Sat Feb 19 11:20:29 2005 +0000
@@ -0,0 +1,39 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Ilya Zaitseff <sark7@mail333.com>
+// @date@	2005-02-14
+// @uri@	news:opsl6xtajtaaezs2@robingood
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2984
+
+// __DSTRESS_DFLAGS__ -inline
+
+module dstress.run.inline_04;
+
+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;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/inline_05.d	Sat Feb 19 11:20:29 2005 +0000
@@ -0,0 +1,37 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Ilya Zaitseff <sark7@mail333.com>
+// @date@	2005-02-14
+// @uri@	news:opsl6xtajtaaezs2@robingood
+// @url@	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;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/inline_06.d	Sat Feb 19 11:20:29 2005 +0000
@@ -0,0 +1,36 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Ilya Zaitseff <sark7@mail333.com>
+// @date@	2005-02-14
+// @uri@	news:opsl6xtajtaaezs2@robingood
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2984
+
+// __DSTRESS_DFLAGS__ -inline
+
+module dstress.run.inline_06;
+
+struct MyStruct{
+
+	int[] x;
+
+	int foo() {
+		return 3;
+	}
+
+	MyStruct bar(){
+		MyStruct v;
+		return v;
+	}
+	
+	float bug(MyStruct p1) {
+		return bar.foo;
+	}
+}
+
+int main(){
+	MyStruct s;
+	assert(s.bug(s)==3);
+	return 0;
+}
\ No newline at end of file