author | mcimadamore |
Tue, 12 Mar 2013 16:02:13 +0000 | |
changeset 16340 | 3c0af3413e0f |
parent 15374 | fb8f6acf09cc |
child 22448 | a85fbad9d687 |
permissions | -rw-r--r-- |
14547 | 1 |
/* |
15374
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
2 |
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
4 |
* |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
7 |
* published by the Free Software Foundation. |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
8 |
* |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
13 |
* accompanied this code). |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
14 |
* |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
18 |
* |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
21 |
* questions. |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
22 |
*/ |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
23 |
|
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
24 |
/* |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
25 |
* @test |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
26 |
* @summary check strict method conversion allows loose method reference conversion |
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
27 |
* @compile MethodReference26.java |
14547 | 28 |
*/ |
29 |
||
30 |
class MethodReference26 { |
|
31 |
||
32 |
static void m(Integer i) { } |
|
33 |
||
34 |
interface SAM { |
|
35 |
void m(int x); |
|
36 |
} |
|
37 |
||
38 |
static void call(int i, SAM s) { } |
|
39 |
static void call(Integer i, SAM s) { } |
|
40 |
||
41 |
static void test() { |
|
15374
fb8f6acf09cc
8005244: Implement overload resolution as per latest spec EDR
mcimadamore
parents:
14547
diff
changeset
|
42 |
call(1, MethodReference26::m); //ok |
14547 | 43 |
} |
44 |
} |