After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 609164 - construct only properties don't work on interfaces
construct only properties don't work on interfaces
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator
0.7.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-06 13:59 UTC by Darren Shepherd
Modified: 2014-06-27 03:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Darren Shepherd 2010-02-06 13:59:31 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)
Comment 1 Abderrahim Kitouni 2010-02-08 11:15:17 UTC
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.
Comment 2 Evan Nemerson 2014-06-27 03:41:29 UTC
Not sure when it was fixed, but it works now.