changeset 695:85543154e101

John C <johnch_atms@hotmail.com> 2005-09-30 news:dhj6pt$1crc$1@digitaldaemon.com
author thomask
date Sun, 02 Oct 2005 20:51:18 +0000
parents 7441f25aa368
children fa8d1cf74ab8
files run/i/inline_15_A.d run/i/inline_15_B.d
diffstat 2 files changed, 58 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/i/inline_15_A.d	Sun Oct 02 20:51:18 2005 +0000
@@ -0,0 +1,28 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John C <johnch_atms@hotmail.com>
+// @date@	2005-09-30
+// @uri@	news:dhj6pt$1crc$1@digitaldaemon.com
+
+module dstress.run.i.inline_15_A;
+
+int[] toArray(int[] params ...) {
+        return params.dup;
+}
+
+int[] values;
+
+void ensure() {
+	values = toArray(1, 2, 3);
+}
+
+int main(){
+	ensure();
+	assert(values.length==3);
+	assert(values[0]==1);
+	assert(values[1]==2);
+	assert(values[2]==3);
+	return 0;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/i/inline_15_B.d	Sun Oct 02 20:51:18 2005 +0000
@@ -0,0 +1,30 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John C <johnch_atms@hotmail.com>
+// @date@	2005-09-30
+// @uri@	news:dhj6pt$1crc$1@digitaldaemon.com
+
+// __DSTRESS_DFLAGS__ -inline
+
+module dstress.run.i.inline_15_B;
+
+int[] toArray(int[] params ...) {
+        return params.dup;
+}
+
+int[] values;
+
+void ensure() {
+	values = toArray(1, 2, 3);
+}
+
+int main(){
+	ensure();
+	assert(values.length==3);
+	assert(values[0]==1);
+	assert(values[1]==2);
+	assert(values[2]==3);
+	return 0;
+}
\ No newline at end of file