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 253736 - Variable in JavaScript method recognized as global
Summary: Variable in JavaScript method recognized as global
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-24 12:29 UTC by Eccenux
Modified: 2015-07-30 01:25 UTC (History)
0 users

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 Eccenux 2015-07-24 12:29:25 UTC
In the first assignment to `address.baseUrl` in below code Netbeans recognizes `address` as a global variable. Don't know what is going on here as `address.id` assignment line is fine for Netbeans.

```
function GlobalUriHelper(myPattern) {
	var _self = this;
	this.parse = function (systemUri) {
		var address = {baseUrl:'', id:0};
		systemUri.replace(myPattern, function(a, protocol, server, id) {
			address.baseUrl = protocol + server;
			address.id = parseInt(id);
		});
		return address;
	};
}
```
Comment 1 Petr Pisl 2015-07-29 08:16:12 UTC
This is fixed in NB 8.1.
Comment 2 Quality Engineering 2015-07-30 01:25:15 UTC
Integrated into 'main-silver', will be available in build *201507300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8afd734b53ee
User: Petr Pisl <ppisl@netbeans.org>
Log: #253736 - Variable in JavaScript method recognized as global