test/script/basic/es6/let-redeclare.js

Print this page




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  * 
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * JDK-8051889: Implement block scoping in symbol assignment and scope computation
  26  *
  27  * @test
  28  * @run
  29  * @option --language=es6
  30  */
  31 
  32 try {
  33     eval('"use strict";\n' +
  34          'let x = 2;\n' +
  35          'let x = 2;\n');
  36 } catch (e) {
  37     print(e);
  38 }


  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  * 
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * JDK-8051889: Implement block scoping in symbol assignment and scope computation
  26  *
  27  * @test
  28  * @run
  29  * @option --language=es6
  30  */
  31 
  32 try {
  33     eval('"use strict";\n' +
  34          'let x = 2;\n' +
  35          'let x = 2;\n');
  36 } catch (e) {
  37     print(String(e).replace(/\\/g, "/"));
  38 }