Single "alias this"

bearophile bearophileHUGS at lycos.com
Sun Jul 25 07:53:51 PDT 2010


Deokjae Lee:

> //interfaces first, base class last
> class Foo : I1, I2, Base {}
> 
> This doesn't compile.
> I didn't know the order of base class and interfaces matter.

If not already present, that looks good for Bugzilla.

> The output is the following.
> 
> B
> zsh: segmentation fault  ./Test3

Currently "alias this" is a quite buggy feature.
You can try to reduce that code to the minimal, and then you can add it to Bugzilla.
In my opinion "alias this" (as typedef in past) is mostly useful/designed for structs, that don't have inheritance. "alias this" is a feature a bit dirty.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list