I’m getting the same error in two places using a lambda function as an argument to GLib.List.foreach.
error: incompatible function pointer types passing 'void (gconstpointer, gpointer)' (aka 'void (const void *, void *)') to parameter of type 'GFunc' (aka 'void (*)(void *, void *)')
// in my subclass of AdwApplication
private void on_quit () {
this.get_windows ().foreach ((obj) => {
var win = (Vapad.Window) obj;
win.close_all ();
});
}
Is this something I’m doing subtly wrong so that it works sometimes, or is it likely a compiler bug?