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

Bug 361458

Summary: removeAll after plus operation removes both arrays
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-10-19 15:04:34 EDT
Debug through the program below.
The removeAll statement removes elements in newList and myNames.
Should only be on newList.

program removeAllPgm type BasicProgram{}
    myNames string[] =["Carolina", "State", "Duke"];
    element string = "Meredith";
    newList string[];
    function main()
        newList = myNames + element;		
        newList.removeAll();	/ Wrong  Removes elements in newList and myNames
    end
end
Comment 1 Jeff Douglas CLA 2011-10-26 14:10:02 EDT
fixed
Comment 2 broy2 CLA 2011-11-03 11:23:38 EDT
Verified in 20111103 build.