After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 597294 - Delegates as parameters in async functions
Delegates as parameters in async functions
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Async
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-10-04 12:54 UTC by Michael 'Mickey' Lauer
Modified: 2009-10-05 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael 'Mickey' Lauer 2009-10-04 12:54:42 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)
Comment 1 Jürg Billeter 2009-10-05 16:50:46 UTC
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.