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

Summary: JavaScript function declaration inside scope reads as global
Product: javascript Reporter: Ult_Combo
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED WORKSFORME    
Severity: normal CC: vriha
Priority: P4    
Version: 7.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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