function ( a, b ) name="comparator", throws name cannot be defined twice

Description

throws name cannot be defined twice

https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/transformer/bytecode/statement/udf/Function.java#L546

https://trycf.com/gist/cd95ba0d3dea261d1284bb7f5cbb5812/lucee5?theme=monokai

works in ACF.

Waves to whose blog post lead to find this https://www.bennadel.com/blog/3795-array-sort-operator-must-return-int-sized-result-in-lucee-cfml-5-3-4-80.htm

because "the return value of the function [lamba_6]" is confusing, I'd like to see "the return value of the function [comparator]"

I'd prefer this style

but it throws Invalid Syntax Closing [)] for function [sort] not found
https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/transformer/cfml/expression/AbstrCFMLExprTransformer.java#L1883

Environment

None

Assignee

Michael Offner

Reporter

Zac Spitzer

Priority

New

Labels

Fix versions

None

Affects versions

Configure