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>
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 7132880 |
aoqi@0 | 4 | * @summary Resolve should support nested resolution contexts |
aoqi@0 | 5 | * @compile/fail/ref=T7132880.out -XDrawDiagnostics T7132880.java |
aoqi@0 | 6 | */ |
aoqi@0 | 7 | class Outer { |
aoqi@0 | 8 | void m1(String s) { } |
aoqi@0 | 9 | void m2(int i1, int i2) { } |
aoqi@0 | 10 | |
aoqi@0 | 11 | class Inner { |
aoqi@0 | 12 | void test() { |
aoqi@0 | 13 | //ok - no method named 'm' in Inner - hence, class to search is Outer |
aoqi@0 | 14 | m1(""); |
aoqi@0 | 15 | } |
aoqi@0 | 16 | } |
aoqi@0 | 17 | |
aoqi@0 | 18 | class Inner1 { |
aoqi@0 | 19 | void m1(Integer i) { } |
aoqi@0 | 20 | |
aoqi@0 | 21 | void test() { |
aoqi@0 | 22 | //error - Inner1 defines an incompatible method - hence, class to search is Inner1 |
aoqi@0 | 23 | m1(""); |
aoqi@0 | 24 | } |
aoqi@0 | 25 | } |
aoqi@0 | 26 | |
aoqi@0 | 27 | class Inner2 { |
aoqi@0 | 28 | private void m1(Integer i) { } |
aoqi@0 | 29 | private void m1(Double d) { } |
aoqi@0 | 30 | |
aoqi@0 | 31 | void test() { |
aoqi@0 | 32 | //error - Inner2 defines multiple incompatible methods - hence, class to search is Inner2 |
aoqi@0 | 33 | m1(""); |
aoqi@0 | 34 | } |
aoqi@0 | 35 | } |
aoqi@0 | 36 | |
aoqi@0 | 37 | class Inner3 { |
aoqi@0 | 38 | private void m2(Object o, int i) { } |
aoqi@0 | 39 | private void m2(int i, Object o) { } |
aoqi@0 | 40 | |
aoqi@0 | 41 | void test() { |
aoqi@0 | 42 | //error - Inner3 defines multiple ambiguous methods - hence, class to search is Inner3 |
aoqi@0 | 43 | m2(1, 1); |
aoqi@0 | 44 | } |
aoqi@0 | 45 | } |
aoqi@0 | 46 | |
aoqi@0 | 47 | class Inner4 extends Inner2 { |
aoqi@0 | 48 | void test() { |
aoqi@0 | 49 | //ok - Inner2 defines multiple incompatible inaccessible methods - hence, class to search is Outer |
aoqi@0 | 50 | m1(""); |
aoqi@0 | 51 | } |
aoqi@0 | 52 | } |
aoqi@0 | 53 | |
aoqi@0 | 54 | class Inner5 extends Inner3 { |
aoqi@0 | 55 | void test() { |
aoqi@0 | 56 | //ok - Inner3 defines multiple inaccessible ambiguous methods - hence, class to search is Outer |
aoqi@0 | 57 | m2(1, 1); |
aoqi@0 | 58 | } |
aoqi@0 | 59 | } |
aoqi@0 | 60 | } |