Thread overview | ||||||
---|---|---|---|---|---|---|
|
October 06, 2004 Auto classes and with() | ||||
---|---|---|---|---|
| ||||
There is a problem with using with() statements on auto class variables. The following snippet fails to compile: auto class Foo { } |
October 07, 2004 Re: Auto classes and with() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick | Nick wrote:
> There is a problem with using with() statements on auto class variables. The following snippet fails to compile:
>
> auto class Foo
> {
> }
did you forget something? I don't see a "with" anywhere.
Also, complete code example are better - why make the n people who try your code write the rest when you can write it once and save us all the effort? (plus it makes it more likely n>0)
-Ben
|
October 07, 2004 Re: Auto classes and with() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | In article <ck279i$gl6$1@digitaldaemon.com>, Ben Hinkle says... > >Nick wrote: > >> There is a problem with using with() statements on auto class variables. The following snippet fails to compile: >> >> auto class Foo >> { >> } > > >did you forget something? I don't see a "with" anywhere. Err.. sorry. The rest must have been cut out somehow. We try again: # auto class Foo # { # } # # void main() # { # auto Foo f = new Foo; # # with(f) # { # } # } Compiling gives: tst.d(9): variable __withSym reference to auto class must be auto Nick |
October 08, 2004 Re: Auto classes and with() | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick | Nick schrieb: > # auto class Foo > # { > # } > # > # void main() > # { > # auto Foo f = new Foo; > # > # with(f) > # { > # } > # } > > Compiling gives: > tst.d(9): variable __withSym reference to auto class must be auto added to dstress: svn://svn.kuehne.cn/dstress/run/with_11.d Thomas |
Copyright © 1999-2021 by the D Language Foundation