[Issue 1363] New: Compile-time issue with structs in 'for'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 23 00:48:45 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1363
Summary: Compile-time issue with structs in 'for'
Product: D
Version: 1.019
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: samukha at voliacable.com
Related to 1300.
struct Bar
{
int x;
}
int foo()
{
Bar bar;
// Error: cannot evaluate foo() at compile time
for (bar.x = 0; bar.x < 10; bar.x++)
{
}
return bar.x;
}
void main(char[][] args)
{
static x = foo();
}
--
More information about the Digitalmars-d-bugs
mailing list