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 682715 - Only one generic can be specified in function or delegate param list
Only one generic can be specified in function or delegate param list
Status: RESOLVED DUPLICATE of bug 611191
Product: vala
Classification: Core
Component: Genie
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jamie McCracken
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-26 09:10 UTC by Simon Feltman
Modified: 2012-08-26 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple example showing compilation failure (222 bytes, application/octet-stream)
2012-08-26 09:10 UTC, Simon Feltman
Details

Description Simon Feltman 2012-08-26 09:10:38 UTC
Created attachment 222448 [details]
Simple example showing compilation failure

A compilation error occurs when trying to do something like the following:

[indent=4]
uses
    Gee

class ObservableArrayList of C : Gee.ArrayList of C
    delegate Changed(index:int, added:list of C, removed:list of C) : bool
    
    def changed(a:int, b:list of C, c:list of C)
        return


$ valac --pkg=gee-1.0 -C gobjectlistmodel.gs
gobjectlistmodel.gs:6.57-6.57: error: syntax error, expected `)' but got `:' with previous identifier
    delegate Changed(index:int, added:list of C, removed:list of C) : bool
                                                        ^
gobjectlistmodel.gs:8.38-8.38: error: syntax error, expected `)' but got `:' with previous identifier
    def changed(a:int, b:list of C, c:list of C)
                                     ^
Compilation failed: 2 error(s), 0 warning(s)



This all works if only a single generic parameter is used.
Comment 1 Simon Feltman 2012-08-26 09:13:25 UTC
Just found this to be a duplicate.

*** This bug has been marked as a duplicate of bug 611191 ***