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 727652 - Compilation fails in some cases when using [GenericAccessors]
Compilation fails in some cases when using [GenericAccessors]
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-05 11:17 UTC by Simon Werbeck
Modified: 2014-04-05 16:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix generation of generic accessors (1.15 KB, patch)
2014-04-05 11:21 UTC, Simon Werbeck
none Details | Review

Description Simon Werbeck 2014-04-05 11:17:36 UTC
The following test program fails to compile on c-level:

[GenericAccessors]
public interface ITest<G> : Object {
}

public class Test : Object, ITest<int> {
}

void main () {
}

Output from gcc:
In function ‘test_itest_get_g_destroy_func’:
error: ‘int_destroy’ undeclared (first use in this function)
Comment 1 Simon Werbeck 2014-04-05 11:21:07 UTC
Created attachment 273613 [details] [review]
Fix generation of generic accessors

Fixes bug 727652
Comment 2 Luca Bruno 2014-04-05 16:37:12 UTC
commit c045337110c90786ddb03cac511787252b948655
Author: Simon Werbeck <simon.werbeck@gmail.com>
Date:   Sat Apr 5 13:11:51 2014 +0200

    codegen: Do not generate generic destroy func for non-disposable structs
    
    Fixes bug 727652

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.