Tue, 01 Sep 2015 18:28:11 +0530
8068901: Surprising behavior with more than one functional interface on a class
8068903: Can't invoke vararg @FunctionalInterface methods
Reviewed-by: attila, hannesw
sundar@383 | 1 | /* |
sundar@383 | 2 | * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. |
sundar@383 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
attila@962 | 4 | * |
sundar@383 | 5 | * This code is free software; you can redistribute it and/or modify it |
sundar@383 | 6 | * under the terms of the GNU General Public License version 2 only, as |
sundar@383 | 7 | * published by the Free Software Foundation. |
attila@962 | 8 | * |
sundar@383 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
sundar@383 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
sundar@383 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
sundar@383 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
sundar@383 | 13 | * accompanied this code). |
attila@962 | 14 | * |
sundar@383 | 15 | * You should have received a copy of the GNU General Public License version |
sundar@383 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
sundar@383 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
attila@962 | 18 | * |
sundar@383 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
sundar@383 | 20 | * or visit www.oracle.com if you need additional information or have any |
sundar@383 | 21 | * questions. |
sundar@383 | 22 | */ |
sundar@383 | 23 | |
sundar@383 | 24 | /** |
attila@962 | 25 | * JDK-8019226: line number not generated for first statement if it is on the same function declaration line |
sundar@383 | 26 | * |
sundar@383 | 27 | * @test |
sundar@383 | 28 | * @run |
sundar@383 | 29 | */ |
sundar@383 | 30 | |
sundar@383 | 31 | function func1() { func2() } |
sundar@383 | 32 | |
sundar@386 | 33 | function func2() { throw new Error("failed!") } |
sundar@383 | 34 | |
sundar@383 | 35 | try { |
sundar@383 | 36 | func1() |
sundar@383 | 37 | } catch (e) { |
sundar@383 | 38 | print(e.stack.replace(/\\/g, '/')) |
sundar@383 | 39 | } |