• Thanks for this - I've just filed an issue at https://github.com/espruino/Espruino/iss­ues/2067

    It looks like the parser is attempting to parse an AssignmentExpression as the body of the first arrow function - but I'll have to step through to see why it's not picking up the second one. It might be due to an optimisation that tries to skip over blocks when they're not being executed.

    Worth noting that x=>{ return (y)=>0 } works fine.


Avatar for Gordon @Gordon started