Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353455

Summary: DeclarationExpressions with wrong qualifiers in IR
Product: z_Archived Reporter: Scott Greer <greer>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: jeffdouglas, mheitz, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 352125    
Attachments:
Description Flags
Box.egl none

Description Scott Greer CLA 2011-07-30 14:08:15 EDT
Created attachment 200623 [details]
Box.egl

In Box.egl (attached), there is a function with a local field declared as follows:

td Widget { tagName="td", children = [child] };

In the IR, this is expanded out into a series of AssignmentStatements, one of which has no qualifier and the other which has a ThisExpression qualifier.

I'm writing this up on the assumption that's an IR problem, however, I suppose it may be a problem with the generator(s).
Comment 1 Scott Greer CLA 2011-07-30 14:11:04 EDT
This problem manifests as the following code in JavaScript:

	var td = null;
	td = new egl.egl.ui.rui.Widget();
	this.setTagName("td");
        this.setChildren([child].setType("Tegl/ui/rui/Widget;"));

As it happens, both td and the local part are both Widgets, so the resulting code winds up invoking the setTagName, setChildren methods on the part rather than the td variable.
Comment 2 Paul Harmon CLA 2011-08-18 13:28:39 EDT
This has been fixed with an update to MemberAccessImpl
Comment 3 Scott Greer CLA 2011-09-12 09:13:01 EDT
Verified.