GNOME Bugzilla – Bug 609164
construct only properties don't work on interfaces
Last modified: 2014-06-27 03:41:29 UTC
Steps to reproduce i.vala: public interface IDInterface : Object { public abstract string id { get; construct; } } o.vala: public class IDObject : IDInterface, Object { public string id { get; construct; } } public static void main(string[] args) { } valac i.vala o.vala: /home/darren/Projects/VMake/temp/o.vala.c:66: warning: ‘id_interface_set_id’ used but never defined /tmp/ccfvotda.o: In function `id_object_set_property': o.vala.c:(.text+0x350): undefined reference to `id_interface_set_id' collect2: ld returned 1 exit status error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s)
from my comments on the mailling list : something public that is used in the second file isn't declared. adding: const char* id_interface_get_id (IDInterface* self); void id_interface_set_id (IDInterface* self, const char* value); after: GType id_interface_get_type (void); in the generated C files solves the problem, so it shouldn't be very difficult to fix, it just needs someone who is familiar with the codegen.
Not sure when it was fixed, but it works now.