GNOME Bugzilla – Bug 682715
Only one generic can be specified in function or delegate param list
Last modified: 2012-08-26 09:13:25 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.
Just found this to be a duplicate. *** This bug has been marked as a duplicate of bug 611191 ***