author | ysuenaga |
Wed, 30 Mar 2016 21:05:13 +0900 | |
changeset 37218 | c7241bc368bf |
parent 30846 | 2b3f379840f0 |
child 40316 | 20b50a99fe8d |
permissions | -rw-r--r-- |
16307 | 1 |
/* |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
22445
diff
changeset
|
2 |
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. |
16307 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
16315
3e29f09420ca
8008658: Four new method param jtreg tests fail in nightly tests
ksrini
parents:
16307
diff
changeset
|
26 |
* @bug 8006582 8008658 |
16307 | 27 |
* @summary javac should generate method parameters correctly. |
30846 | 28 |
* @modules jdk.jdeps/com.sun.tools.classfile |
16307 | 29 |
* @build Tester |
30 |
* @compile -parameters MemberClassTest.java |
|
21044
ffba9cdeff1a
8015372: Update tests for Method Parameter Reflection API to check whether a parameter is final
mnunez
parents:
16315
diff
changeset
|
31 |
* @run main Tester MemberClassTest MemberClassTest.out |
16307 | 32 |
*/ |
33 |
||
34 |
class MemberClassTest { |
|
35 |
||
36 |
interface I { |
|
37 |
Long m(); |
|
38 |
Long m(Long x, Long yx); |
|
39 |
} |
|
40 |
||
41 |
public class Member implements I { |
|
42 |
public class Member_Member { |
|
43 |
public Member_Member() {} |
|
44 |
public Member_Member(String x, String yx) {} |
|
45 |
} |
|
46 |
||
47 |
public Member() { } |
|
48 |
public Member(Long a, Long ba) { } |
|
49 |
public Long m() { return 0L; } |
|
50 |
public Long m(Long s, Long ts) { return 0L; } |
|
51 |
} |
|
52 |
||
53 |
static class Static_Member implements I { |
|
54 |
public class Static_Member_Member { |
|
55 |
public Static_Member_Member() {} |
|
56 |
public Static_Member_Member(String x, String yx) {} |
|
57 |
} |
|
58 |
||
59 |
public static class Static_Member_Static_Member { |
|
60 |
public Static_Member_Static_Member() {} |
|
61 |
public Static_Member_Static_Member(String x, String yx) {} |
|
62 |
} |
|
63 |
public Static_Member() { } |
|
64 |
public Static_Member(Long arg, Long barg) { } |
|
65 |
public Long m() { return 0L; } |
|
66 |
public Long m(Long s, Long ts) { return s + ts; } |
|
67 |
} |
|
68 |
||
69 |
public MemberClassTest() { |
|
70 |
} |
|
71 |
public MemberClassTest(final Long a, Long ba) { |
|
72 |
} |
|
73 |
||
74 |
public void foo() { |
|
75 |
||
76 |
new I() { |
|
77 |
||
78 |
class Anonymous_Member { |
|
79 |
public Anonymous_Member() {} |
|
80 |
public Anonymous_Member(String x, String yx) {} |
|
81 |
} |
|
82 |
||
83 |
public Long m() { return 0L; } |
|
84 |
public Long m(Long s, Long ts) { return s + ts; } |
|
85 |
}.m(); |
|
86 |
} |
|
87 |
} |