Mercurial > projects > dstress
diff compile/i/interpret_05_A.d @ 1515:516ef5730874
[Issue 1108] Indexing an int[] not evaluatable at compile time
Reiner Pope <reiner.pope@gmail.com>
2007-04-07
http://d.puremagic.com/issues/show_bug.cgi?id=1108
author | thomask |
---|---|
date | Wed, 25 Apr 2007 17:47:00 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/i/interpret_05_A.d Wed Apr 25 17:47:00 2007 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Reiner Pope <reiner.pope@gmail.com> +// @date@ 2007-04-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1108 +// @desc@ [Issue 1108] Indexing an int[] not evaluatable at compile time + +module dstress.compile.i.interpret_05_A; + +int foo(){ + int[] data = [0xBABE_2007]; + return data[0]; +} + +static assert(0xBABE_2007 == foo());