inout problems

Timon Gehr timon.gehr at gmx.ch
Wed Feb 22 04:32:20 PST 2012


On 02/22/2012 05:01 AM, Andrej Mitrovic wrote:
> 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?

Yes. See http://d.puremagic.com/issues/show_bug.cgi?id=7053


More information about the Digitalmars-d-learn mailing list