Tue, 10 Apr 2012 08:15:25 -0700
7074397: Build infrastructure changes (makefile re-write)
Summary: New makefiles transition, old and new living side by side for now.
Reviewed-by: ohair, jjg, dholmes, ohrstrom, erikj, ihse, tgranat, ykantser
Contributed-by: ohrstrom <fredrik.ohrstrom@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 7132880
4 * @summary Resolve should support nested resolution contexts
5 * @compile/fail/ref=T7132880.out -XDrawDiagnostics T7132880.java
6 */
7 class Outer {
8 void m1(String s) { }
9 void m2(int i1, int i2) { }
11 class Inner {
12 void test() {
13 //ok - no method named 'm' in Inner - hence, class to search is Outer
14 m1("");
15 }
16 }
18 class Inner1 {
19 void m1(Integer i) { }
21 void test() {
22 //error - Inner1 defines an incompatible method - hence, class to search is Inner1
23 m1("");
24 }
25 }
27 class Inner2 {
28 private void m1(Integer i) { }
29 private void m1(Double d) { }
31 void test() {
32 //error - Inner2 defines multiple incompatible methods - hence, class to search is Inner2
33 m1("");
34 }
35 }
37 class Inner3 {
38 private void m2(Object o, int i) { }
39 private void m2(int i, Object o) { }
41 void test() {
42 //error - Inner3 defines multiple ambiguous methods - hence, class to search is Inner3
43 m2(1, 1);
44 }
45 }
47 class Inner4 extends Inner2 {
48 void test() {
49 //ok - Inner2 defines multiple incompatible inaccessible methods - hence, class to search is Outer
50 m1("");
51 }
52 }
54 class Inner5 extends Inner3 {
55 void test() {
56 //ok - Inner3 defines multiple inaccessible ambiguous methods - hence, class to search is Outer
57 m2(1, 1);
58 }
59 }
60 }