Mercurial > projects > dstress
changeset 1144:afe5081510a3
[Issue 352] New: Assertion failure: expression.c 753 - concatenating strings in a template calling another template
Stewart Gordon <smjg@iname.com>
2006-09-16
news:bug-352-3@http.d.puremagic.com/issues/
author | thomask |
---|---|
date | Wed, 20 Sep 2006 19:11:12 +0000 |
parents | 868813e44edf |
children | 8c53d3cfa6f6 |
files | compile/o/opCat_23_A.d compile/o/opCat_23_B.d compile/o/opCat_23_C.d compile/o/opCat_23_D.d compile/o/opCat_23_E.d compile/o/opCat_23_F.d |
diffstat | 6 files changed, 138 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_23_A.d Wed Sep 20 19:11:12 2006 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg@iname.com> +// @date@ 2006-09-16 +// @uri@ news:bug-352-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 352] New: Assertion failure: expression.c 753 - concatenating strings in a template calling another template + +module dstress.compile.o.opCat_23_A; + +template A(char[] x){ + const char[] A = x; +} + +template B(char[] y){ + const char[] B = A!(y ~ "dog"); +} + +const char[] s = B!("CAT"); + +static assert(s == "CATdog"); +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_23_B.d Wed Sep 20 19:11:12 2006 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg@iname.com> +// @date@ 2006-09-16 +// @uri@ news:bug-352-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 352] New: Assertion failure: expression.c 753 - concatenating strings in a template calling another template + +module dstress.compile.o.opCat_23_B; + +template A(char[] x){ + const char[] A = x; +} + +template B(char[] y){ + const char[] B = A!("dog" ~ y); +} + +const char[] s = B!("CAT"); + +static assert(s == "dogCAT"); +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_23_C.d Wed Sep 20 19:11:12 2006 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg@iname.com> +// @date@ 2006-09-16 +// @uri@ news:bug-352-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 352] New: Assertion failure: expression.c 753 - concatenating strings in a template calling another template + +module dstress.compile.o.opCat_23_C; + +template A(char[] x){ + const char[] A = x; +} + +template B(char[] y){ + const char[] B = A!("dog" ~ y); +} + +const char[] s = B!(null); + +static assert(s == "dog"); +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_23_D.d Wed Sep 20 19:11:12 2006 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg@iname.com> +// @date@ 2006-09-16 +// @uri@ news:bug-352-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 352] New: Assertion failure: expression.c 753 - concatenating strings in a template calling another template + +module dstress.compile.o.opCat_23_D; + +template A(char[] x){ + const char[] A = x; +} + +template B(char[] y){ + const char[] B = A!(y ~ "dog"); +} + +const char[] s = B!(null); + +static assert(s == "dog"); +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_23_E.d Wed Sep 20 19:11:12 2006 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg@iname.com> +// @date@ 2006-09-16 +// @uri@ news:bug-352-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 352] New: Assertion failure: expression.c 753 - concatenating strings in a template calling another template + +module dstress.compile.o.opCat_23_E; + +template A(char[] x){ + const char[] A = x; +} + +template B(char[] y){ + const char[] B = A!(y); +} + +const char[] s = B!(""); + +static assert(s.length == 0); +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_23_F.d Wed Sep 20 19:11:12 2006 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Stewart Gordon <smjg@iname.com> +// @date@ 2006-09-16 +// @uri@ news:bug-352-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 352] New: Assertion failure: expression.c 753 - concatenating strings in a template calling another template + +module dstress.compile.o.opCat_23_F; + +template A(char[] x){ + const char[] A = x; +} + +template B(char[] y){ + const char[] B = A!(y); +} + +const char[] s = B!(null); + +static assert(s.length == 0); +