Re: segmentation fault with Object.factory()

2017-02-19 Thread ag0aep6g via Digitalmars-d-learn
On 02/19/2017 12:13 PM, berni wrote: And here is what I get when compiling: $> rdmd test.d segmentation fault $> rdmd --extra-file=test2.d test.d segmentation fault $> rm -rf /tmp/.rdmd-1000/ $> rdmd --extra-file=test2.d test.d A $> rdmd -version rdmd build 20170122 [...] Should I report this

Re: segmentation fault with Object.factory()

2017-02-19 Thread berni via Digitalmars-d-learn
On Sunday, 19 February 2017 at 10:15:49 UTC, rikki cattermole wrote: What's wrong here? void main() { A bar = cast(A)Object.factory(__MODULE__ ~ ".AA"); bar.foo(); } Oops. I overdid when trying to create a small example. With the module it works, but my original program had the module

Re: segmentation fault with Object.factory()

2017-02-19 Thread rikki cattermole via Digitalmars-d-learn
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 occ

segmentation fault with Object.factory()

2017-02-19 Thread berni via Digitalmars-d-learn
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(); ins