Test case: { let a = 42; function f() { return a } print(f()) } This throws "ReferenceError: Can't find variable: a". If I run this in strict mode, it works as expected (printing 42).
(In reply to Adam Klein from comment #0) > Test case: > > { > let a = 42; > function f() { return a } > print(f()) > } > > This throws "ReferenceError: Can't find variable: a". If I run this in > strict mode, it works as expected (printing 42). We don't support this in global scope. We do support it inside functions and I believe eval. We still need to implement it for the global scope. e.g, replace outer {} with function (and maybe eval) and it works.
Friendly ping. It's been a while, would be good to get this fixed.
<rdar://problem/110394639>
*** This bug has been marked as a duplicate of bug 163209 ***