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 783218 - ValaProperty cannot handle overridden properties which add feature bits
ValaProperty cannot handle overridden properties which add feature bits
Status: RESOLVED DUPLICATE of bug 686542
Product: vala
Classification: Core
Component: Objects
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-29 21:40 UTC by Christian Hergert
Modified: 2017-05-30 05:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Hergert 2017-05-29 21:40:40 UTC
If you have an interface which indicates that some properties must be G_PARAM_READABLE, it is a common GObject pattern to add a G_PARAM_WRITABLE bit to a class implementing that property (when it makes sense).

ValaProperty incorrectly assumes that the base interface not having a set accessor means that the property is invalid and errors as such:

  Dazzle-1.0.gir:561.7-561.33: error: Type and/or accessors of overriding property `Dzl.ChildPropertyAction.enabled' do not match overridden property `GLib.Action.enabled': incompatible set accessor.

One temporary workaround is to just add a function for the setter, but that breaks the ability to use GBinding.

I assume this is also broken for G_PARAM_WRITABLE properties in an interface (where the class implementation adds a G_PARAM_READABLE bit).
Comment 1 Rico Tzschichholz 2017-05-30 05:33:48 UTC

*** This bug has been marked as a duplicate of bug 686542 ***