On Friday, 2 January 2015 at 00:08:02 UTC, anonymous wrote:
Apparently dmd thinks that the result of f must be a nested
struct. I.e. it needs a context pointer. And I guess hell would
break loose if you'd use a nested struct with a null context
pointer. At least when the context pointer is actu
On Thursday, 1 January 2015 at 23:06:30 UTC, Peter Alexander
wrote:
Can someone please explain this behaviour? I find it totally
bizarre.
auto f(T)(T x) {
struct S {
T y;
this(int) { }
}
return S(0);
}
void main() {
f(f(0));
}
E