GNOME Bugzilla – Bug 655608
Access control when implementing an interface
Last modified: 2018-05-22 14:06:41 UTC
Right now Vala allows you doing: public interface EmailDetails : Object { public abstract Set<FieldDetails> email_addresses { get; set; } } public class Person, EmailDetails { public Set<FieldDetails> email_addresses { get { return this._email_addresses_ro; } private set { // .... } } } whereas one would expect that the setter should have the same access type as the interface being implemented... But things get really confusing because the set of email_addresses in Person *is* actually public, cause the following code works (!!): Person p = new Person(); p.email_addresses = emails; // <-- shouldn't be allowed!The interface wins.
-- 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/218.