test/script/basic/es6/const-empty.js

Print this page




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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         'const x;\n');
  35 } catch (e) {
  36     print(e);
  37 }


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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         'const x;\n');
  35 } catch (e) {
  36     print(String(e).replace(/\\/g, "/"));
  37 }