Yes, no type inference for unowned variables, sorry. That's a deficiency we
hope to overcome at some point.


On Tue, Dec 31, 2013 at 9:23 PM, rastersoft <[email protected]> wrote:

> Hi all:
>
> I'm creating a VAPI, and one of the constructors is defined as:
>
>     public static unowned Icccm new(Xcb.Connection conn) {
>         unowned Xcb.Icccm.Icccm retval = (Xcb.Icccm.Icccm)conn;
>         return retval;
>     }
>
> The idea is to create an Icccm object that is, in fact, a Xcb.Connection
> object in disguise. The problem is that all these calls return an error:
>
>     var icccm = Xcb.Icccm.new(this.conn);
>     unowned var icccm = Xcb.Icccm.new(this.conn);
>     var unowned icccm = Xcb.Icccm.new(this.conn);
>
> and the only way to create a new object is using:
>
>     unowned Xcb.Icccm.Icccm icccm = Xcb.Icccm.new(this.conn);
>
> Am I doing something wrong, or really the vala compiler doesn't allow to
> use type inference and unowned types?
>
> Thanks!
>
> --
> Nos leemos
>                          RASTER    (Linux user #228804)
> [email protected]              http://www.rastersoft.com
>
> _______________________________________________
> vala-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/vala-list
>



-- 
www.debian.org - The Universal Operating System
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to