Tue, 16 Aug 2016 21:41:28 -0700
Added tag jdk8u102-b33 for changeset 36e3c21b5fca
attila@1019 | 1 | /* |
attila@1019 | 2 | * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. |
attila@1019 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
attila@1019 | 4 | * |
attila@1019 | 5 | * This code is free software; you can redistribute it and/or modify it |
attila@1019 | 6 | * under the terms of the GNU General Public License version 2 only, as |
attila@1019 | 7 | * published by the Free Software Foundation. |
attila@1019 | 8 | * |
attila@1019 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
attila@1019 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
attila@1019 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
attila@1019 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
attila@1019 | 13 | * accompanied this code). |
attila@1019 | 14 | * |
attila@1019 | 15 | * You should have received a copy of the GNU General Public License version |
attila@1019 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
attila@1019 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
attila@1019 | 18 | * |
attila@1019 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
attila@1019 | 20 | * or visit www.oracle.com if you need additional information or have any |
attila@1019 | 21 | * questions. |
attila@1019 | 22 | */ |
attila@1019 | 23 | |
attila@1019 | 24 | /** |
attila@1019 | 25 | * JDK-8058561: NPE in LocalVariableTypesCalculator |
attila@1019 | 26 | * |
attila@1019 | 27 | * @test |
attila@1019 | 28 | * @run |
attila@1535 | 29 | * @fork |
attila@1019 | 30 | * @option --lazy-compilation=false |
attila@1535 | 31 | * @option -Dnashorn.options.allowEagerCompilationSilentOverride |
attila@1019 | 32 | */ |
attila@1019 | 33 | |
attila@1019 | 34 | // Just attempting to compile this caused the NPE |
attila@1019 | 35 | function func(x, y) { |
attila@1019 | 36 | while(true) { |
attila@1019 | 37 | switch (y[0]) { |
attila@1019 | 38 | case "bar": |
attila@1019 | 39 | x = 'xxx'; |
attila@1019 | 40 | break; |
attila@1019 | 41 | } |
attila@1019 | 42 | } |
attila@1019 | 43 | return x; |
attila@1019 | 44 | } |