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: | Type of variable not fully resolved from JSDoc | ||
---|---|---|---|
Product: | javascript | Reporter: | Vladimir Riha <vriha> |
Component: | Editor | Assignee: | Petr Pisl <ppisl> |
Status: | STARTED --- | ||
Severity: | normal | CC: | vriha |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Vladimir Riha
2012-12-01 23:03:38 UTC
Unfortunately these two cases has separate root of problem. I have created new issue #223891 for the second test case. The first case is little different. When I correct the code to: /** * * @param {window} bla * @returns {Utils} */ var Utils = function(bla) { this.document = bla.document; } Then the type of this.document is recognized correctly. In our signature files there is the property document a part of window object, not Window. Basically in the signature files is something like: var window = new Window(); window.document = new document(); How is it in runtime? Has Window object document property? (In reply to comment #2) > How is it in runtime? Has Window object document property? You're right, Window does not have document. But following still doesn't work: /** * * @param {window} window * @returns {Utils} */ var Utils = function(window) { this.document = window.document; } Code completion for parameter "window" does not show any type and "this.document" is w/o type as well, code completion for this.| shows document: Product Version: NetBeans IDE Dev (Build web-main-9541-on-20121216) Java: 1.7.0_10; Java HotSpot(TM) Client VM 23.6-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18 System: Linux version 3.2.0-34-generic-pae running on i386; UTF-8; en_US (nb) I know, this is the reason, why I keep it open. I will try to fix it. The part of the problem is that the type has the same name as the parameter. The second problem is in the model itself. |