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 663246 - Undefined indetifiers are not catched.
Undefined indetifiers are not catched.
Status: RESOLVED DUPLICATE of bug 655741
Product: vala
Classification: Core
Component: Semantic Analyzer
0.14.x
Other Linux
: Normal major
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-02 15:05 UTC by Fabian Deutsch
Modified: 2011-11-02 15:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabian Deutsch 2011-11-02 15:05:58 UTC
Take the following code:

class Foo: Object
{
  public int bar { get; set; }
  public void poo ()
  {
    bar = 3;
    _bar = 3; // BUG -Works even if not defined.
    // _boz = 3; // Raises an valac error as expected.
  }
}

void main ()
{
  var f = new Foo ();
  f.poo ();
}


this code works, even if _bar is not defined. The bug is that valac doesn't complain. gcc also doesn't complain, because there is the field for bar is prefixed with an "_" in the ccode.
An error is raised if e.g. _boz is used instead of _bar.

This happens in 0.14.0 (release) as well as in master.
Comment 1 Luca Bruno 2011-11-02 15:11:07 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 655741 ***