lambda icon indicating copy to clipboard operation
lambda copied to clipboard

More problems with `let`

Open 71104 opened this issue 8 years ago • 2 comments

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

71104 avatar Jun 20 '16 01:06 71104

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.

71104 avatar Jul 01 '16 17:07 71104

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.

71104 avatar Sep 07 '16 23:09 71104