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 246729 - Function incorrectly evaluated as an object
Summary: Function incorrectly evaluated as an object
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 243918 248159 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-27 14:39 UTC by Roman Svitanic
Modified: 2015-05-05 15:54 UTC (History)
1 user (show)

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 Roman Svitanic 2014-08-27 14:39:18 UTC
Example:

obj.f1 = obj.f2 = function () {}

or

obj.f2 = function() { };
obj.f1 = obj.f2;

In both cases above obj.f1 should be evaluated as a function, not an object.
Comment 1 Roman Svitanic 2015-04-23 16:17:55 UTC
*** Bug 243918 has been marked as a duplicate of this bug. ***
Comment 2 Roman Svitanic 2015-04-23 16:19:21 UTC
Another simple case on which the issue can be reproduced:

function A() {
    this.test = function () {};
}
var a = new A();
var x = {
    demo: a.test()
};
x. // invoke CC here -> demo is not evaluated as a function
Comment 3 Roman Svitanic 2015-05-05 15:54:00 UTC
*** Bug 248159 has been marked as a duplicate of this bug. ***