You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example code at https://run.dlang.io/is/Is9tAs
A workaround is to define a default constructor, as per https://run.dlang.io/is/mhM24Y
But this is just doubling up on work that I shouldn't need to do.
Came about because I was trying to explicitly invoke a templated constructor in a base class. Simple example at https://run.dlang.io/is/XAsoyo
The text was updated successfully, but these errors were encountered:
andrei (@andralex) commented on 2018-06-07T20:16:51Z
This isn't a bug. Calling __ctor explicitly is advanced usage, not part of the usual typechecking. Is there any strong reason to keep this open? Is it preventing some use case?
The code I'm invoking in my current codebase extracts type data from the template parameter for object management.
Another workaround would probably be to have a templated this( Type )( ref Type val ) in the base class and then call super( this ) from the derived class. Which feels as janky as it looks.
Supporting super!( Args )() would be far more preferable, won't even need to do a __ctor hack then.
Ethan Watson reported this on 2018-05-20T17:20:39Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=18886
CC List
Description
The text was updated successfully, but these errors were encountered: