Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341727 - [content assist] field not detected when assigned to argument in invoked function literal
Summary: [content assist] field not detected when assigned to argument in invoked func...
Status: RESOLVED WORKSFORME
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5.1   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-03 15:18 EDT by Kir CLA
Modified: 2013-08-15 02:44 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kir CLA 2011-04-03 15:18:08 EDT
Build Identifier: 20110218-0911

Code: 
1. function ScopeTestObj () { 
2. 	this.string_field = 'string_field';
3. }
4. var Scope = new ScopeTestObj();
5.
6. Scope = (function ( MyScope ) {
7. 	MyScope.function_field = function () { 
8.		return 'function_field'; 
9.	};
10.	return MyScope;
11. })(Scope);
12.
13. var newStringFfield	= Scope.string_field;
14. var newFunctionField	= Scope.function_field();

Reproducible: Always

Steps to Reproduce:
http://habreffect.ru/files/937/b20c149b9/eclipse_wst_error.png
Line 14 - error: function function_field is undefined

it can be any type of field.
Comment 1 Kir CLA 2011-04-03 15:19:47 EDT
Javascript IDE Feature	1.3.2.20110218-0812	org.eclipse.epp.package.javascript.feature.feature.group
Comment 2 Kir CLA 2011-06-30 08:21:08 EDT
bug reproduce for:

Eclipse IDE for JavaScript Web Developers.
Version: Indigo Release
Build id: 20110615-0604

JavaScript Development Tools
Version: 1.3.0.v201103031824-7F78FXPFBBoPbXRIcIgs0z0
Build id: 20110527214303
Comment 3 Kir CLA 2011-06-30 16:11:14 EDT
and additional info:
Code: 
1. function ScopeTestObj () { 
2.     this.string_field = 'string_field';
3. }
4. var Scope = new ScopeTestObj();
5.
6. (function ( MyScope ) { //DELETE Assignment
7.     MyScope.function_field = function () { 
8.        return 'function_field'; 
9.    };
10.   //DELETE RETURN
11. })(Scope);
12.
13. var newStringFfield    = Scope.string_field;
14. var newFunctionField    = Scope.function_field();

line 14 - same error
Comment 4 Chris Jaun CLA 2013-08-02 10:58:51 EDT
Works in WTP 3.5.1.