class radio : Object
	event empty_event ()
	def emit_event ()
		empty_event()

def cb (r : radio)
	print "signal caught from non-closure cb"

def acb ()
	print "signal caught from non-closure cb without arguments "

init
	vas : array of string = {"first", "second"}
	var r = new radio()

	// No warning/ critical, but does not work
	for va in vas
		print "register closured event handler without brackets and (?!) " + va
		r.empty_event += def ano_three
			print "closure without brackets (?!) " + va

	// Have brackets in the definition of the callback
	/* Leads to CRITICAL during compile time and is immediately evaluated:
	vala_ccode_expression_statement_construct : Assertion expr != NULL failed */
	for va in vas
		print "register closured event handler with brackets and " + va
		r.empty_event += def ano_two ()
			print "closure with brackets " + va

	r.empty_event += cb
	r.empty_event += acb

	print "----"
	print "Now emitting"
	r.emit_event()
