"alias foo this" compiles when "foo" is not defined
Jarrett Billingsley
jarrett.billingsley at gmail.com
Fri Jun 26 15:20:24 PDT 2009
On Fri, Jun 26, 2009 at 5:54 PM, Ary Borenszweig<ary at esperanto.org.ar> wrote:
> Is is ok that this compiles without errors?
>
> class Foo {
> alias errorProne this;
> }
>
If I had to guess, it's only OK because the compiler probably doesn't
actually look for the aliased symbol until you actually try to access
something from it. But that does seem .. wrong.
More information about the Digitalmars-d-learn
mailing list