[Vala] badly generated code
- From: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
- To: vala <vala-list gnome org>
- Subject: [Vala] badly generated code
- Date: Wed, 16 Mar 2011 13:54:17 +0000
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]