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 258724 - netbeans doesn't autocomplete in named function expression
Summary: netbeans doesn't autocomplete in named function expression
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-08 10:41 UTC by josef.sabl
Modified: 2016-08-12 02:49 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Correct behavior (13.87 KB, image/png)
2016-04-08 10:41 UTC, josef.sabl
Details
Buggy behavior (11.47 KB, image/png)
2016-04-08 10:41 UTC, josef.sabl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description josef.sabl 2016-04-08 10:41:18 UTC
Created attachment 159163 [details]
Correct behavior

See the code below:

function Person(name, age) {
	this.name = name;
	this.age = age;
}

Person.prototype.getName = function () { //Anonymous function expression
	return this.name; // .name gets suggested
}

Person.prototype.getAge = function getAge() { //Named function expression
	return this.age; // .age does NOT get suggested (actually there is "no suggestions")
}
Comment 1 josef.sabl 2016-04-08 10:41:52 UTC
Created attachment 159164 [details]
Buggy behavior
Comment 2 Petr Pisl 2016-08-11 09:38:48 UTC
Fixed in web-main.
Comment 3 Quality Engineering 2016-08-12 02:49:31 UTC
Integrated into 'main-silver', will be available in build *201608120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6fb3a1edcddc
User: Petr Pisl <ppisl@netbeans.org>
Log: #258724 - netbeans doesn't autocomplete in named function expression