Mercurial > projects > dstress
changeset 1241:98f3c6ec25d8
[Issue 595] New: can't append to array/arrayliteral statically
Nazo Humei <lovesyao@hotmail.com>
2006-11-25
news:bug-595-3@http.d.puremagic.com/issues/
author | thomask |
---|---|
date | Sat, 25 Nov 2006 17:53:28 +0000 |
parents | 0972a593ff76 |
children | 11f43a5eef14 |
files | compile/o/opCat_25_A.d compile/o/opCat_25_B.d |
diffstat | 2 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_25_A.d Sat Nov 25 17:53:28 2006 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Nazo Humei <lovesyao@hotmail.com> +// @date@ 2006-11-25 +// @uri@ news:bug-595-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 595] New: can't append to array/arrayliteral statically + +module dstress.compile.o.opCat_25_A; + +const char[] a = null; +const char[] b = a ~ 'd'; + +static assert(b == "d");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/opCat_25_B.d Sat Nov 25 17:53:28 2006 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Nazo Humei <lovesyao@hotmail.com> +// @date@ 2006-11-25 +// @uri@ news:bug-595-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 595] New: can't append to array/arrayliteral statically + +module dstress.compile.o.opCat_25_B; + +const char[] a = null; +const char[] b = a ~ ['d']; + +static assert(b == "d");