JDK-8048862 : With scope variable should not be accessible outside the with statement
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2014-07-01
  • Updated: 2015-01-28
  • Resolved: 2015-01-28
Related Reports
Duplicate :  
Description
jjs> (function(o){ try{with(o){return x}}finally{return x} })({x: 1})


Expected:  ReferenceError
Actual: no error.

When we "inline" finally block, we start using "x" inside the 'with' scope.



Comments
Likely same problem as JDK-8067139.
20-01-2015