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 224253 - Why javascript built in object need to declare?
Summary: Why javascript built in object need to declare?
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.3
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-27 09:39 UTC by wyeechen
Modified: 2013-01-09 02:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (355.01 KB, text/plain)
2012-12-27 09:39 UTC, wyeechen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wyeechen 2012-12-27 09:39:00 UTC
The codes below all shows warning of 'the global variable is not declared',

var a = String.fromCharCode(100);
var b = Number.POSITIVE_INFINITY;
var c = Math.abs(-5);
Date.prototype.mymethod = function(){};
Object.prototype.mymethod = function(){};
Array.prototype.mymethod = function(){};

I think javascript built in objects shouldn't need to be declared before use, and therefore the warning shall be excluded to these situation.





Product Version = NetBeans IDE Dev (Build 201212260001)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.7.0_10
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Comment 1 wyeechen 2012-12-27 09:39:08 UTC
Created attachment 129711 [details]
IDE log
Comment 2 Petr Pisl 2013-01-08 15:45:02 UTC
Thanks, I have add the Date to the global object set. Array and Object are already there.

Fixed in web-main:
http://hg.netbeans.org/web-main/rev/b7688a2b52a0
Comment 3 Quality Engineering 2013-01-09 02:28:31 UTC
Integrated into 'main-golden', will be available in build *201301090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b7688a2b52a0
User: Petr Pisl <ppisl@netbeans.org>
Log: #224253 - Why javascript built in object need to declare?