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 655741 - Backing fields of properties can be accessed like defined fields
Backing fields of properties can be accessed like defined fields
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Semantic Analyzer
unspecified
Other Linux
: Normal normal
: 1.0
Assigned To: Vala maintainers
Vala maintainers
: 663246 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-01 18:03 UTC by Raul Gutierrez Segales
Modified: 2018-05-22 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Raul Gutierrez Segales 2011-08-01 18:03:47 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).
Comment 1 Luca Bruno 2011-11-02 15:11:07 UTC
*** Bug 663246 has been marked as a duplicate of this bug. ***
Comment 2 GNOME Infrastructure Team 2018-05-22 14:06:53 UTC
-- 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.