April 03, 2006
I was writing a callback system for my program when the following issue turned up. (gdc mac 0.17)

ext is a bool i a superclass

void classfunktion()
{
	//crashes with access violation
	//auto exitfunk=delegate bool(){return ext=true;};
	//does not change ext
	//bool exitfunk(){return ext=true;};
	
	//used here
	widgets[$-1]=new Widget("exit button",p,window,input,&exitfunk);
}

when i declared it at class level it works
bool exitfunk(){return ext=true;};

is this expected behavior with delegate and inner functions or is it a bug?
April 04, 2006
In article <e0qq49$2j9$1@digitaldaemon.com>, Johan Granberg says...
>	widgets[$-1]=new Widget("exit button",p,window,input,&exitfunk);
>is this expected behavior with delegate and inner functions or is it a bug?

You are storing a reference to a local variable.