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 696592 - Vala seems to be too restrictive about property overriding
Vala seems to be too restrictive about property overriding
Status: RESOLVED DUPLICATE of bug 575439
Product: vala
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-25 21:36 UTC by Lars Karlitski
Modified: 2013-03-25 21:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lars Karlitski 2013-03-25 21:36:19 UTC
For example, implementing a read-only property with a read-write property is not possible:

  class MyAction: Object, Action {

      public string name { get; set; }
      public bool enabled { get; set; }

      /* ... */
  }

gives the error:

  Type and/or accessors of overriding property `MyAction.enabled'
  do not match overridden property `GLib.Action.enabled': incompatible
  set accessor.

Weirdly, it works for the "name" property.  Am I missing something?

This commits describes how property overriding works in gobject:

  https://git.gnome.org/browse/glib/commit/?id=af24dbc12aa77aac3c82d39872878558cced7add
Comment 1 Maciej (Matthew) Piechotka 2013-03-25 21:40:37 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

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