Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360271 - set-value statement on list element doesn't work
Summary: set-value statement on list element doesn't work
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 14:58 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:17 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-10-07 14:58:20 EDT
Expect both variations to work.

program driver type BasicProgram {}
	function main()
		trs TestRec[]? = new TestRec[ 1 ];			
		trs[1]{ s = "a value for field s" };
		assertTest(trs[1].s);
		
		tr TestRec;
                tr{ s = "a value for field s" };
                assertTest(tr.s);
	end

	function assertTest(incoming string in)
		hardcoded string = "a value for field s";
		if (incoming == hardcoded)
			syslib.writeStdout("Works");
		else
			syslib.writeStdout("Fails:" + incoming + ".");
		end
	end
end

record TestRec
	s string;
end

Found in eunit test lang.expression.initializer.ObjectInitialization001
Comment 1 Jeff Douglas CLA 2011-10-20 13:31:20 EDT
fixed
Comment 2 Kathy Carroll CLA 2011-10-21 12:25:35 EDT
Verified with 201110210902 & closed