An interesting consequence of safety requirements
Leandro Lucarella
llucax at gmail.com
Wed Nov 4 11:13:31 PST 2009
Leandro Lucarella, el 4 de noviembre a las 16:06 me escribiste:
> > List * someFun() {
> > List local;
> > List * lst = new List;
> > local.prepend(lst);
> > return lst;
> > }
> > So get ready to use static a lot more ;o).
>
> Or maybe th compiler should rewrite local.prepend(lst); as:
> auto this_ = &local;
> f(*_this);
Damn! I mean:
auto this_ = &local;
List.prepend(*_this, lst);
--
Leandro Lucarella (AKA luca) http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
You should've seen her face. It was the exact same look my father gave me when
I told him I wanted to be a ventriloquist.
-- George Constanza
More information about the Digitalmars-d
mailing list