Elvis operator glitches on function returns

Description

It looks like the Elvis operator doesn't work quite right with function return values that are arrays. Repro:

This errors with:

It works as expected on ColdFusion.

My use case is that the result of a .reduce() call generally returns an array, but it might reduce down to an empty array, in which case I want to default the ultimate return value to an empty array, rather than the first item of the reduction.

Environment

None

Assignee

Michael Offner

Reporter

Adam Cameron

Priority

Minor

Labels

None

Fix versions

None

Affects versions

Configure