turtles features (Was: Flag proposal)

bearophile bearophileHUGS at lycos.com
Mon Jun 13 18:29:06 PDT 2011


Timon Gehr:

> Will this be fixed too?

Mutually recursive inner functions are not so common, and there is a workaround, making one of them a delegate defined before.

But what about this?

auto foo()()
out(result) {
} body {
    return 0;
}
void main() {
    foo();
}


test.d(1): Error: function test.foo!().foo post conditions are not supported if the return type is inferred
test.d(7): Error: template instance test.foo!() error instantiating
test.d(7): Error: forward reference to inferred return type of function call foo

This is a common problem for my code, is it possible to fix (support) this? (In functional-style code auto return values are sometimes almost necessary).

Bye,
bearophile


More information about the Digitalmars-d mailing list