Fighting with alias this: bugs or features?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Oct 26 15:09:42 PDT 2010
On 10/26/10 16:58 CDT, osa wrote:
> On 10/26/2010 04:46 PM, Andrei Alexandrescu wrote:
>> In this particular case the decision goes both ways, and both have
>> something going for them. You may want to submit a bug report at least
>> to prompt us to change the documentation to clarify the behavior.
>> A workaround is to define opAssign(Bar).
>
> I do not see how defining opAssign would help here. I want to nullify
> local reference to a Bar instance (to let GC dispose of Bar object, for
> example). I do not need to change Bar or Foo.
>
> Anyway, I filed bug report:
> http://d.puremagic.com/issues/show_bug.cgi?id=5123
Thanks. Defining opAssign for Bar will allow you to use the syntax bar =
null and have it nullify the reference.
(I meant "could go both ways" instead of "goes both ways".)
Andrei
More information about the Digitalmars-d
mailing list