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.
Summary: | Javacsript Intellisense type information is lost on var when constructed via "new MyLib.Class()" | ||
---|---|---|---|
Product: | javascript | Reporter: | NukemBy |
Component: | Editor | Assignee: | Petr Pisl <ppisl> |
Status: | STARTED --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | ScreenShot - The Global Varialbe is not declared |
Description
NukemBy
2014-03-01 17:05:45 UTC
Created attachment 145697 [details]
ScreenShot - The Global Varialbe is not declared
I suppose the root cause for that problem is naming conflict which somehow appears in NetBeans between "this.MyLibClass" and "function MyLibClass". In valid JS these names exist in different contexts and should not intersect, but NetBeans currently fails when name of the variable within 'this' is the same as name of the function. See attached screenshot. Problem does no occur with following code: var myLib2 = new function MyLib2() { function _MyLibClass() {}; this.MyLibClass = _MyLibClass; }; or var myLib2 = new function MyLib2() { function MyLibClass() {}; this._MyLibClass = MyLibClass; }; Reproducible, I'm going to look at this. |