Connecting async handler to signal fails
Connecting an async handler to a signal results in invalid C code.
class Foo {
public signal int bar (string s);
}
async int handler (string s) {
return 42;
}
void main() {
var foo = new Foo ();
foo.bar.connect (handler);
}
$ valac --pkg gio-2.0 test.vala --target-glib 2.70
test.vala.c: In function ‘_handler_foo_bar’:
test.vala.c:408:16: error: void value not ignored as it ought to be
408 | result = handler (s, NULL, NULL);
| ^
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
A support for async signals would be awesome but even without it, the compiler should probably give a better error message and stop the compilation before the C compiler.