Lucee fails silently, ACF still appends the value
Merge: This argument only applies when the value is an array.
If set to true appends array elements individually to the source array.
If false (default) the complete array is added as one element at the end, in the source array.
Lucee should either match the ACF behaviour or throw an exception
The explanation for this is found here:
Lucee considers (among other things)
structs with numeric keys
to be castable to an array.
So I disagree that it's strictly 'failing silently'. It's more that Lucee has a more loose sense of what an array is compared to Adobe CF, which I'm sure is important for the BIF to be able to work with native Java collections.
For compatibility, an additional check could be made to ensure that the object was not an explicit struct.
i first was considering to only allow struct in case it also has content, but that could lead to even worse missunderstandings of the functionality, so i reduced the flixibility of the cast in that case, Struct are no longer considered as an array in that case.