GNOME Bugzilla – Bug 599892
Static properties are not compiled properly
Last modified: 2009-10-28 14:24:34 UTC
Static properties are not compiled properly and are not present in the output C code. Take a look at line 64 in the Test.c below. There should be a second argument, i.e. test_nop (self, test_get_x ()); instead of test_nop (self); $ valac --version Vala 0.7.7 $ cat Test.vala class Test { public static int x {get; set;} Test(int val) { x = val; nop(x); } private void nop(int a) { } } $ valac -C Test.vala ** (valac:15280): CRITICAL **: vala_ccode_member_access_construct_pointer: assertion `container != NULL' failed ** (valac:15280): CRITICAL **: vala_ccode_member_access_construct_pointer: assertion `container != NULL' failed ** (valac:15280): CRITICAL **: vala_ccode_function_call_add_argument: assertion `expr != NULL' failed $ grep 'test_construct (GType.*{' -A6 -n Test.c 60:static Test* test_construct (GType object_type, gint val) { 61- Test* self; 62- self = (Test*) g_type_create_instance (object_type); 63- test_set_x (val); 64- test_nop (self); 65- return self; 66-}
commit d040b40d58f14b03e602f493bd5e551b62e0b1e0 Author: Jürg Billeter <j@bitron.ch> Date: Wed Oct 28 15:18:54 2009 +0100 Fix static property access in instance methods Fixes bug 599892.