elves / upgrade-scripts-for-0.17

Upgrade Elvish scripts for 0.17
BSD 2-Clause "Simplified" License
4 stars 2 forks source link

Wrong output given an empty argument list #4

Closed hanche closed 2 years ago

hanche commented 2 years ago

Minmal example:

⬥ echo 'x = []{ nop }' | upgrade-scripts-for-0.17 -lambda
var x = {||] nop }

I have no idea why one of my scripts used this construct, but it did. It's an odd corner case that nevertheless should be fixed.

Edited to add: No problem with [ ]{ nop }. A single space makes all the difference.