lambda
lambda copied to clipboard
More problems with `let`
let console.log.lol = 0 in console.log 5 # prints "undefined" instead of "5"
let console.log.lol = 0 in console.log.lol # runtime error
The second one happens because there's a marshal round-trip for the log
function and "expandos" don't get marshalled towards the native side. That is, when the expanded log
closure is marshalled to a native function, the native function doesn't have the extra "lol" property.
As of 6b61305dd7c812b83f0c56be355c0676d85e6a02, the second one is gone and the problem with the first one is that after the expansion console.log
's character becomes undefined
.