inout problems

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Feb 21 20:01:35 PST 2012


class Foo
{
    this(int) inout
    { }

    Foo makeFoo() { return new Foo(1); }
}

void main() { }

test.d(8): Error: cannot implicitly convert expression (new Foo(1)) of
type inout(Foo) to test.Foo

Is this a bug?


More information about the Digitalmars-d-learn mailing list