public delegate void MyDelegate (int param);
public struct MyStruct {
	public MyDelegate del;
}
public class DelegateBug {
	public static void main (string[] args) {
		new DelegateBug().run ();
	}
	public void run () {
		// this will result in (*boxed).del and (*(*boxed)).del_target, preventing c compilation
		MyStruct? boxed = MyStruct ();
		boxed.del = print_int;
		boxed.del (0);
		
		//this works
		MyStruct my_struct = MyStruct ();
		my_struct.del = print_int;
		my_struct.del (1);
		
		// this will result in del_target not being set
		MyStruct init = MyStruct () {del=print_int};
		init.del(2);
	}
	void print_int (int param) {
		message ("%d", param);
	}
}
