GNOME Bugzilla – Bug 780522
Ownership transfer of implicit GLib.Value/Variant transformation in property-getters is not recognized
Last modified: 2018-05-22 15:47:40 UTC
Created attachment 348689 [details] test case with GLib.Value as GObject property, Vala generates two GValue and returns wrong value (the initialized GValue isn't returned)
vala version : 0.34.7 GLib version 2.52.0
same bug with vala = 0.36.0, where value is unset before being returned.
Created attachment 348691 [details] test case 2 In this test case, the value in static function isn't unset
The problem is that due to the implicit GValue conversion the property-accessor must be declared as "owned get". Property-accessors are by default unowned, so vala needs to throw an error about owned to unowned assignment.
I understand. so I have to rewrite my code. thanks :)
This is a bug after all. Marking the property-getter as "owned get { ... }" is hardly a rewrite ;)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/581.