Status/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Matthieu Labarre / Matthieu Labarre ()
Created: 01/25/2018
Components: Language, Functions
Versions: 2016,2018
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 2016,0,05,303689 / 2018,0,0,307104
Priority/Frequency: Normal / Few users will encounter
Locale/System: / CentOS 7.3
Vote Count: 4
Problem Description:
The function ArrayResize (and its counterpart .resize() ) can't be applied to an unsynchronised array.
Steps to Reproduce:
Execute the following script:
{code:java}
<cfscript>
myArray = ArrayNew(1, false);
ArrayResize(myArray, 1000);
// or myArray.resize(1000);
myArraySize = ArrayLen(myArray);
writeOutput(myArraySize);
</cfscript>
{code}
Actual Result:
An error is thrown at "ArrayResize(myArray, 1000)" :
"coldfusion.runtime.FastArray cannot be cast to coldfusion.runtime.Array on line 3"
Expected Result:
No error thrown; "1000" is displayed
Attachments:
Comments: