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.

Bug 218416 - JavaScript function declaration inside scope reads as global
Summary: JavaScript function declaration inside scope reads as global
Status: RESOLVED WORKSFORME
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-16 12:28 UTC by Ult_Combo
Modified: 2012-09-17 06:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ult_Combo 2012-09-16 12:28:33 UTC
Paste into a JS:

(function(){
	function foo(){}
	
	$(document).on('click', foo);
	
}());

`foo` is a function declared inside the IIFE, yet the syntax highlighter gives it a global style and doesn't mark it in the "Mark Occurrences".
Comment 1 Vladimir Riha 2012-09-17 06:18:23 UTC
seems to be fine in 7.3



  Product Version         = NetBeans IDE Dev (Build 201209170001) (#1d9cebae5bf2)
  Operating System        = Linux version 3.2.0-30-generic-pae running on i386
  Java; VM; Vendor        = 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_07-b10