Review request for JDK-8057980: let & const: remaining issues with lexical scoping
marcus.lagergren at oracle.com
Thu Nov 27 16:30:44 UTC 2014
> On 27 Nov 2014, at 17:26, Hannes Wallnoefer <hannes.wallnoefer at oracle.com> wrote:
> Unfortunately changes in Parser.java did not apply cleanly to 8u-dev. Can you please review the webrev for 8u-dev?
> I also had to add a ForNode.setPerIterationScope method because of the lack of ParserContextNodes in 8u.
> Am 2014-11-27 um 16:20 schrieb Attila Szegedi:
>> On Nov 27, 2014, at 1:09 PM, Hannes Wallnoefer <hannes.wallnoefer at oracle.com> wrote:
>>> Please review JDK-8057980: let & const: remaining issues with lexical scoping:
>>> Summary of changes:
>>> - Throw error when let/const declaration is used in single-statement context as it is not a statement
>>> - Implement per-iteration scope in for(let ; ;) loop
>>> - Throw error for let/const in top-level switch statement. This should be supported, but we can't implement this correctly without a bigger rewrite of switch statement handling.
>>> - Overwriting const binding from different script should throw type error also in non-strict mode.
>>> - Removed unused flags: VarNode.IS_STATEMENT and ForNode.IS_FOR
More information about the nashorn-dev