Mercurial > projects > dstress
comparison 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 |
comparison
equal
deleted
inserted
replaced
1514:891196dcfc3a | 1515:516ef5730874 |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Reiner Pope <reiner.pope@gmail.com> | |
6 // @date@ 2007-04-07 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1108 | |
8 // @desc@ [Issue 1108] Indexing an int[] not evaluatable at compile time | |
9 | |
10 module dstress.compile.i.interpret_05_A; | |
11 | |
12 int foo(){ | |
13 int[] data = [0xBABE_2007]; | |
14 return data[0]; | |
15 } | |
16 | |
17 static assert(0xBABE_2007 == foo()); |