tracker issue : CF-3041912

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 83871:(Watson Migration Closure)structCopy doesn't copy the arguments scope

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/LowImpact

Reporter/Name(from Bugbase): Elliott Sprehn / Elliott Sprehn (Elliott Sprehn)

Created: 08/19/2010

Components: Language, CFSCRIPT

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 1

Problem:

structCopy doesn't copy the arguments scope. This is a really nasty regression that breaks code that worked in CF8. This is a regression of bug 79029 filed during pre-release and marked as fixed.
Method:

function assignArguments(){var args = structCopy(arguments);args.x = 2; // BUG: Changes arguments.x !!!args.y = 10; var other = structCopy(args);args.y = 20; // BUG: changes args.y too !!return arguments;}result = assignArguments(x=5).x; // BUG: result is 2 instead of 5 !!
Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3041912

External Customer Info:
External Company:  
External Customer Name: Elliott Sprehn
External Customer Email: 202D59C844579997992016B7
External Test Config: 08/19/2010

Attachments:

Comments: