[Issue 1108] New: Indexing an int[] not evaluatable at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 7 17:53:02 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1108
Summary: Indexing an int[] not evaluatable at compile time
Product: D
Version: 1.010
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: reiner.pope at gmail.com
CTFE cannot evaluate:
int Index()
{
int[] data = [1];
return data[0];
}
void main()
{
static assert(Index() == 1);
}
ctfebug.d(9): Error: cannot evaluate Index() at compile time
ctfebug.d(9): static assert (Index() == 1) is not evaluatable at compile time
--
More information about the Digitalmars-d-bugs
mailing list