GNOME Bugzilla – Bug 597294
Delegates as parameters in async functions
Last modified: 2009-10-05 16:50:46 UTC
public delegate void Delegate(); // this compiles void syncFunc( Delegate cb ) { cb(); } // this not async void asyncFunc( Delegate cb ) { cb(); } void main() { } ============================================ ** (valac:24379): CRITICAL **: vala_data_type_get_value_owned: assertion `self != NULL' failed /local/pkg/vala/test/asyncdelegateparam.vala.c: In function 'asyncFunc_data_free': /local/pkg/vala/test/asyncdelegateparam.vala.c:40: error: 'asyncFuncData' has no member named 'cb_target_destroy_notify' /local/pkg/vala/test/asyncdelegateparam.vala.c:40: error: 'asyncFuncData' has no member named 'cb_target_destroy_notify' /local/pkg/vala/test/asyncdelegateparam.vala.c:43: error: 'asyncFuncData' has no member named 'cb_target_destroy_notify' error: cc exited with status 256 Compilation failed: 1 error(s), 2 warning(s)
commit 43c8f34ed184a730874f87be47f116d707407ff7 Author: Jürg Billeter <j@bitron.ch> Date: Mon Oct 5 18:49:52 2009 +0200 GAsync: Fix async methods with delegate parameters Fixes bug 597294.