author | hannesw |
Thu, 26 Jan 2017 12:58:57 +0100 | |
changeset 43350 | ff69fce83f18 |
permissions | -rw-r--r-- |
43350
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
1 |
/* |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
2 |
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
4 |
* |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
8 |
* |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
13 |
* accompanied this code). |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
14 |
* |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
18 |
* |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
21 |
* questions. |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
22 |
*/ |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
23 |
|
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
24 |
/** |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
25 |
* JDK-8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
26 |
* |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
27 |
* @test |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
28 |
* @run |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
29 |
*/ |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
30 |
|
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
31 |
var f = Java.type("jdk.nashorn.test.models.FunctionalInterfaceProvider").getImpl(); |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
32 |
|
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
33 |
var s = "a"; |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
34 |
s += "b"; |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
35 |
var o = { p: 10 }; |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
36 |
var a = [1, 2, 3]; |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
37 |
|
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
38 |
f([ f([]), f([]), f([]), f([]), f([]), f([]), f([]), f([]) ]); |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
39 |
f([ f([]), f([ f([]), f([f([]), f([]), f([]) ]), f([])]), f([]) ]); |
ff69fce83f18
8172006: Nashorn JavaScript engine fails to call @FunctionalInterface with a java.util.List argument
hannesw
parents:
diff
changeset
|
40 |
f([ f([s]), f([o]), f([a]), f([s + "c"]), f([o]), f([a]) ]); |