Hi, 

the following test program (which for me looks correct) generates bad C
code (treats void as an actual assignable type):

/*
 * valac --pkg gio-2.0 ./test.vala
 */

using GLib;

[DBus (name = "com.meego.libsocialweb.ItemView")]
public interface ItemView : GLib.DBusProxy {
  public abstract void Start () throws GLib.IOError;
}

public int main ()
{
  var conn = Bus.get_sync (BusType.SESSION);

  conn.get_proxy<ItemView>.begin<ItemView> (
      "com.meego.libsocialweb", "/foo/bar", 0, null, (v) =>
    {
      ItemView view = (ItemView)v;
      message ("Closures in Vala");
      view.Start ();
    });
  return 0;
}

valac bails with :

/tmp/test.vala.c:239:7: error: variable or field ‘_tmp1_’ declared void
/tmp/test.vala.c:248:155: error: ‘g_dbus_connection_get_proxy’
undeclared (first use in this function)

I am guessing the combination of GLib.DBusConnection.get_proxy being
async + taking Generic parameters might be confusing valac?

Has any one stumbled with something similar?

Cheers,
Raúl

_______________________________________________
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to