hannesw@991: /* hannesw@991: * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. hannesw@991: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. hannesw@991: * hannesw@991: * This code is free software; you can redistribute it and/or modify it hannesw@991: * under the terms of the GNU General Public License version 2 only, as hannesw@991: * published by the Free Software Foundation. hannesw@991: * hannesw@991: * This code is distributed in the hope that it will be useful, but WITHOUT hannesw@991: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or hannesw@991: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License hannesw@991: * version 2 for more details (a copy is included in the LICENSE file that hannesw@991: * accompanied this code). hannesw@991: * hannesw@991: * You should have received a copy of the GNU General Public License version hannesw@991: * 2 along with this work; if not, write to the Free Software Foundation, hannesw@991: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. hannesw@991: * hannesw@991: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA hannesw@991: * or visit www.oracle.com if you need additional information or have any hannesw@991: * questions. hannesw@991: */ hannesw@991: hannesw@991: /** hannesw@991: * JDK-8051889: Implement block scoping in symbol assignment and scope computation hannesw@991: * hannesw@991: * @test hannesw@991: * @run hannesw@991: * @option --language=es6 hannesw@991: */ hannesw@991: hannesw@991: try { hannesw@991: eval('"use strict";\n' + hannesw@991: 'const x = 2;\n' + hannesw@991: 'const x = 2;\n'); hannesw@991: } catch (e) { hannesw@991: print(e); hannesw@991: }