This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Simple test case 1: function test(foo, bar){ foobar = (typeof foo == "undefined") ? bar : foo; } Place cursor inside the first or last occurrence of "foo" => "foo" in the "(typeof foo == "undefined")" is not highlighted as it should be Another scenario: - use the same code and change the 2nd line to this: foobar = (typeof foooo == "undefined") ? bar : foo; => variable foooo is not recognized as global (~undefined in the function) Removing the typeof from the IF statements fixes both problems Product Version: NetBeans IDE Dev (Build 201203180400) Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02 System: Linux version 3.0.0-16-generic running on i386; UTF-8; en_US (nb)
I don't want to create new issue, so I'll update this one. In the new JS editor, if you use the mentioned test case then all instances of bar/foo are not highlighted on the line with "typeof". Product Version: NetBeans IDE Dev (Build 2012-03-22_03-56-25 )
Fixed all three mentioned problems. Thanks.
verified Product Version: NetBeans IDE Dev (Build 2012-03-23_09-53-16 )
Integrated into 'main-golden', will be available in build *201207100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/cda364884c7c User: Petr Pisl <ppisl@netbeans.org> Log: #209717 - Typeof keyword in IF statement causes problems with context of variables This is fixing the part with mark occurences in the ternary node.