[Pkg-vala-maintainers] Bug#838829: Try to add Generics declaration to class definition

Sebastian Reichel sre at debian.org
Tue Sep 27 13:02:08 UTC 2016


Hi,

On Tue, Sep 27, 2016 at 06:36:12AM -0500, Daniel Espinosa wrote:
> As for bug:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=770449
> 
> Valac have started to check types in other places and if GitHub manual is
> used to check generic classes declaration, as for:
> 
> https://github.com/valadate-project/the-vala-manual/blob/master/en/generics-examples.md
> 
> then your example should be:
> 
> public abstract class basecl<T> : Object {
>   public abstract void test<T>(T parameter);
> }
> 
> public class inheritcl<T> : basecl {
>   public override void test<T>(T parameter) {
>     stdout.printf("Just a test!\n");
>   }
> }
> 
> May you want to test this code and change this bug, as this may it is not,
> but a code update required due to recent additional checks in valac.

No. Your code also fails with valac 0.34.0. In vala 0.34.0 you can't
override generic methods. Note that it already has been fixed
upstream:

https://git.gnome.org/browse/vala/commit/?h=0.34&id=9e0e03f2ca48eeef4d16067cca21426b240cd5c5

vala 0.32.0 and vala 0.34.0 with that fix applied compiles my
testcode from above without any problems. Also the libfsoframework
no longer FTBFS.

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vala-maintainers/attachments/20160927/6f0cd954/attachment.sig>


More information about the Pkg-vala-maintainers mailing list