inout problems
James Miller
james at aatch.net
Tue Feb 21 21:00:47 PST 2012
On 22 February 2012 17:01, Andrej Mitrovic <andrej.mitrovich at gmail.com> 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?
I have no idea if it is a bug or not, but can I ask why you're
inout-ing the constructor? Seems odd to me thats all.
More information about the Digitalmars-d-learn
mailing list