On 19/02/2017 11:06 PM, berni wrote:
I get a segmentation fault, when I run this program:void main() { A bar = cast(A)Object.factory("AA"); bar.foo(); } class A { abstract void foo(); } class AA:A { override void foo() {} }The call of bar.foo() is, where the segmentation fault occurs. When I use A bar = new AA(); instead of the factory it works. What's wrong here?
void main() { A bar = cast(A)Object.factory(__MODULE__ ~ ".AA"); bar.foo(); }