GNOME Bugzilla – Bug 663246
Undefined indetifiers are not catched.
Last modified: 2011-11-02 15:11:07 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.
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 ***