Implementing interfaces using alias this

Balagopal Komarath via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 14 06:15:07 PDT 2017


On Wednesday, 14 June 2017 at 12:35:05 UTC, Mike B Johnson wrote:
> void main()
> {
> 	Test!Duck d;
> 	d.quack();
> }
>
> which, unfortunately causes a segmentation fault ;)

I think that is because you are not initializing d using new 
Test!Duck();


More information about the Digitalmars-d-learn mailing list