[Issue 2560] ICE on invoking method that takes ref const struct parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 7 14:48:29 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2560
------- Comment #3 from dransic at free.fr 2009-01-07 16:48 -------
Though I'm not sure why, I guess this is related:
struct Foo {
int x, y, z;
this(int dummy) {}
}
invariant(Foo) createFoo() {
return cast(invariant) Foo(0);
}
void main() {
auto foo = createFoo;
}
causes the same compilation error without the -inline option. Compiles OK if I
remove z, the constructor, or 'invariant' in the return type of createFoo.
--
More information about the Digitalmars-d-bugs
mailing list