GNOME Bugzilla – Bug 655741
Backing fields of properties can be accessed like defined fields
Last modified: 2018-05-22 14:06:53 UTC
Why does the following code works: class Dog { public string name { get; private set; } public Dog (string n) { _name = n; } public void info () { GLib.stdout.printf ("My name is %s\n", _name); } public static int main() { var d = new Dog ("scobby"); d.info (); return 0; } } ? Vala seems to be confused and treating _name as this.name (or just name).
*** Bug 663246 has been marked as a duplicate of this bug. ***
-- 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/219.