[Issue 1625] cannot evaluate function @compile-time when return type includes a union
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 29 04:56:05 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1625
spam at extrawurst.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |spam at extrawurst.org
------- Comment #2 from spam at extrawurst.org 2007-11-29 06:56 -------
ok the above example works under dmd2.008 just cause of the changes in the
const thing, when involving static it isnt able to evaluate the union stuff
@compile time again:
[CODE]
struct Foo {
union {
struct {
float x,y,z;
}
float[3] _v;
}
static Foo bar(){
Foo f;
return f;
}
}
void main() {
static Foo foo = Foo.bar();//Error: cannot evaluate bar() at compile time
}
[/CODE]
--
More information about the Digitalmars-d-bugs
mailing list