On 09/02/2011 08:46 PM, Andrej Mitrovic wrote:
Damn it looks like I've ran into some template bug as well.

With this:
     @property void connect(Signal signal = Signal.MouseClick)(void
delegate() dg)
     {
         clickHandlers ~= dg;
     }

and a call like this:
item.connect = { this.showMenu(0); };

this crashes with an access violation. But if I change connect to be a
regular function:
     @property void connect(void delegate() dg)
     {
         clickHandlers ~= dg;
     }

Then it works properly. Hmmm...

What happens if you declare the function final?

Reply via email to