On Sunday, 9 March 2014 at 12:21:18 UTC, bearophile wrote:
Jack Applegame:

This fails to compile
http://dpaste.dzfl.pl/e9a90e808af4

There are various ways to avoid this problem, using static classes/structs is one of the simplest:

void main() {
    static class B {
        int a;
        this(int aa) { a = aa; }
    }
    auto foo = {
        return new B(1);
    };
}

Bye,
bearophile

thanks

Reply via email to