Re: How do you return a subclass instance from a base class method?

2022-11-17 Thread MorteFeuille123 via Digitalmars-d-learn
On Thursday, 17 November 2022 at 06:48:13 UTC, Daniel Donnelly, Jr. wrote: On Thursday, 17 November 2022 at 05:21:05 UTC, MorteFeuille123 wrote: On Thursday, 17 November 2022 at 04:25:13 UTC, Daniel Donnelly, Jr. wrote: [...] You can use TypeInfoClass: [...] I don't get it - you never made

Re: How do you return a subclass instance from a base class method?

2022-11-16 Thread MorteFeuille123 via Digitalmars-d-learn
On Thursday, 17 November 2022 at 04:25:13 UTC, Daniel Donnelly, Jr. wrote: I have SubclassOf derived from PosetRelation. For any poset relation, the transitivity law applies, however, I'd like to return the correct type: How does one accomplish this in D? Because PosetRelation doesn't know