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

Bug 360271

Summary: set-value statement on list element doesn't work
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: jeffdouglas, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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