# HG changeset patch # User thomask # Date 1177695203 0 # Node ID 1665114e9a64e765ac0581182bf8c32f6e88015c # Parent 37c4fce34442d3a5f13d5aa22bee3a34958fe071 [Issue 1177] $ no longer works inside CTFE functions. Don Clugston 2007-04-23 http://d.puremagic.com/issues/show_bug.cgi?id=1177 diff -r 37c4fce34442 -r 1665114e9a64 compile/i/interpret_06_A.d --- /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 +// @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")); diff -r 37c4fce34442 -r 1665114e9a64 compile/i/interpret_06_B.d --- /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 +// @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"));