Why can't we derive struct's?

Steven Schveighoffer schveiguy at gmail.com
Fri Dec 21 22:39:13 UTC 2018


On 12/21/18 5:23 PM, Steven Schveighoffer wrote:

> And your example from earlier:
> 
> class C : B
> {
>    B b;
>    alias b this;
> }

FYI, this already prints a compiler error, which is exactly the right 
behavior!

Error: alias this is not reachable as C already converts to onlineapp.B

-Steve


More information about the Digitalmars-d mailing list