Singletons, alias this and DMD crashing

Jacob Carlborg doob at me.com
Thu May 9 02:48:30 PDT 2013


On 2013-05-08 23:20, Leandro Motta Barros wrote:
> Hello,
>
> I was toying with the idea of adding an 'alias instance this' to a
> low-lock singleton, to allow calling MySingleton.method(), instead of
> MySingleton.instance.method().

This won't work. You need to be able to overload on static, which you 
can't. I've tried this with opDispatch.

http://d.puremagic.com/issues/show_bug.cgi?id=3345

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list