+1 Please file a CR to like scoped consts as MethodHandle.constant in the future!
Regards Marcus > On 27 Nov 2014, at 13:09, Hannes Wallnoefer <[email protected]> > wrote: > > Please review JDK-8057980: let & const: remaining issues with lexical scoping: > > http://cr.openjdk.java.net/~hannesw/8057980/ > > 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 > > Thanks, > Hannes
