Mercurial > projects > dstress
changeset 1530:1665114e9a64
[Issue 1177] $ no longer works inside CTFE functions.
Don Clugston <clugdbug@yahoo.com.au>
2007-04-23
http://d.puremagic.com/issues/show_bug.cgi?id=1177
author | thomask |
---|---|
date | Fri, 27 Apr 2007 17:33:23 +0000 |
parents | 37c4fce34442 |
children | 640c34dfc7a5 |
files | compile/i/interpret_06_A.d compile/i/interpret_06_B.d |
diffstat | 2 files changed, 34 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/i/interpret_06_A.d Fri Apr 27 17:33:23 2007 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2007-04-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1177 +// @desc@ [Issue 1177] $ no longer works inside CTFE functions. + +module dstress.compile.i.interpret_06_A; + +bool b(char[] a){ + return (a[$-1]=='b'); +} + +static assert(!b("abc")); +static assert(b("b"));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/i/interpret_06_B.d Fri Apr 27 17:33:23 2007 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2007-04-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1177 +// @desc@ [Issue 1177] $ no longer works inside CTFE functions. + +module dstress.compile.i.interpret_06_B; + +bool b(char[] a){ + return (a[a.length-1]=='b'); +} + +static assert(!b("abc")); +static assert(b("b"));