# HG changeset patch # User thomask # Date 1175718863 0 # Node ID a3141f24cfac397e3cf68ca519280d2ab0d7d6c8 # Parent 623963e374c5fe750e2c0e5ac3059d553caa1296 [Issue 1072] this code should run as the same as previous bug code , but dmd av here david 2007-03-20 http://d.puremagic.com/issues/show_bug.cgi?id=1072 diff -r 623963e374c5 -r a3141f24cfac compile/a/array_initialization_33_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/a/array_initialization_33_A.d Wed Apr 04 20:34:23 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ david +// @date@ 2007-03-20 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1072 +// @desc@ [Issue 1072] this code should run as the same as previous bug code , but dmd av here + +module dstress.compile.a.array_initialization_33_A; + +char[] hello(){ + char[] result=""; + for(;;){ + result ~= `abc`; + } + return result; +} + +static assert("" == hello()); diff -r 623963e374c5 -r a3141f24cfac compile/a/array_initialization_33_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/a/array_initialization_33_B.d Wed Apr 04 20:34:23 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ david +// @date@ 2007-03-20 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1072 +// @desc@ [Issue 1072] this code should run as the same as previous bug code , but dmd av here + +module dstress.compile.a.array_initialization_33_B; + +char[] hello(){ + char[] result=""; + foreach(c; ""){ + result ~= `abc`; + } + return result; +} + +static assert("" == hello()); diff -r 623963e374c5 -r a3141f24cfac compile/a/array_initialization_33_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/a/array_initialization_33_C.d Wed Apr 04 20:34:23 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ david +// @date@ 2007-03-20 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1072 +// @desc@ [Issue 1072] this code should run as the same as previous bug code , but dmd av here + +module dstress.compile.a.array_initialization_33_C; + +char[] hello(){ + char[] result=""; + while(false){ + result ~= `abc`; + } + return result; +} + +static assert("" == hello()); diff -r 623963e374c5 -r a3141f24cfac compile/a/array_initialization_33_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/a/array_initialization_33_D.d Wed Apr 04 20:34:23 2007 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ david +// @date@ 2007-03-20 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1072 +// @desc@ [Issue 1072] this code should run as the same as previous bug code , but dmd av here + +module dstress.compile.a.array_initialization_33_D; + +char[] hello(){ + char[] result=""; + return result; +} + +static assert("" == hello()); diff -r 623963e374c5 -r a3141f24cfac compile/a/array_initialization_33_E.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/a/array_initialization_33_E.d Wed Apr 04 20:34:23 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ david +// @date@ 2007-03-20 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1072 +// @desc@ [Issue 1072] this code should run as the same as previous bug code , but dmd av here + +module dstress.compile.a.array_initialization_33_E; + +char[] hello(bool do_loop){ + char[] result=""; + for(;do_loop;){ + result ~= `abc`; + } + return result; +} + +static assert("" == hello(false));