Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361458 - removeAll after plus operation removes both arrays
Summary: removeAll after plus operation removes both arrays
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 15:04 EDT by broy2 CLA
Modified: 2017-02-23 14:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.