author | sogoel |
Fri, 29 Aug 2014 00:42:42 -0700 | |
changeset 26274 | 02a5b23ee21c |
parent 26100 | bb7dd001d190 |
child 30730 | d3ce7619db2c |
permissions | -rw-r--r-- |
19915
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
1 |
/* |
26100 | 2 |
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
19915
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
4 |
* |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
8 |
* |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
13 |
* accompanied this code). |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
14 |
* |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
18 |
* |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
21 |
* questions. |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
22 |
*/ |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
23 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
24 |
/* |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
25 |
* @test |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
26 |
* @bug 8022162 |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
27 |
* @summary Incorrect signature determination for certain inner class generics |
26100 | 28 |
* @library /tools/lib |
19915
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
29 |
* @build ToolBox |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
30 |
* @run main IncorrectSignatureDeterminationForInnerClassesTest |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
31 |
*/ |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
32 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
33 |
public class IncorrectSignatureDeterminationForInnerClassesTest { |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
34 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
35 |
private static final String DSrc = |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
36 |
"package p1;\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
37 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
38 |
"public class D<T> {\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
39 |
"}\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
40 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
41 |
"abstract class Q<T> {\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
42 |
" protected void m(M.E e) {}\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
43 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
44 |
" public class M extends D<T> {\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
45 |
" public class E {}\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
46 |
" }\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
47 |
"}"; |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
48 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
49 |
private static final String HSrc = |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
50 |
"package p1;\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
51 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
52 |
"public class H {\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
53 |
" static class EQ extends Q<Object> {\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
54 |
" private void m2(M.E item) {\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
55 |
" m(item);\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
56 |
" }\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
57 |
" }\n" + |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
58 |
"}"; |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
59 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
60 |
public static void main(String args[]) throws Exception { |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
61 |
new IncorrectSignatureDeterminationForInnerClassesTest().run(); |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
62 |
} |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
63 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
64 |
void run() throws Exception { |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
65 |
compile(); |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
66 |
} |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
67 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
68 |
void compile() throws Exception { |
26100 | 69 |
ToolBox tb = new ToolBox(); |
70 |
tb.createDirectories("classes"); |
|
19915
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
71 |
|
26100 | 72 |
tb.new JavacTask() |
73 |
.outdir("classes") |
|
74 |
.sources(DSrc) |
|
75 |
.run(); |
|
19915
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
76 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
77 |
// compile class H against the class files for classes D and Q |
26100 | 78 |
tb.new JavacTask() |
79 |
.outdir("classes") |
|
80 |
.classpath("classes") |
|
81 |
.sources(HSrc) |
|
82 |
.run(); |
|
19915
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
83 |
} |
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
84 |
|
8a6dae12e4bd
8022162: Incorrect signature determination for certain inner class generics
vromero
parents:
diff
changeset
|
85 |
} |