Lines 7012-7017
Link Here
|
7012 |
}, |
7012 |
}, |
7013 |
"SUCCESS"); |
7013 |
"SUCCESS"); |
7014 |
} |
7014 |
} |
|
|
7015 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=197271 |
7016 |
public void test172() throws Exception { |
7017 |
this.runNegativeTest( |
7018 |
new String[] { |
7019 |
"X.java",//======================= |
7020 |
"public class X {\n" + |
7021 |
" void a() {}\n" + |
7022 |
" private static void a(String s) {}\n" + |
7023 |
" private void c() {}\n" + |
7024 |
" private static void c(String s) {}\n" + |
7025 |
" static class M1 extends X {\n" + |
7026 |
" public void x() {\n" + |
7027 |
" a(null);\n" + |
7028 |
" c(null);\n" + |
7029 |
" }\n" + |
7030 |
" }\n" + |
7031 |
" static class M2 {\n" + |
7032 |
" public void x() {\n" + |
7033 |
" a(null);\n" + |
7034 |
" c(null);\n" + |
7035 |
" }\n" + |
7036 |
" }\n" + |
7037 |
"}\n", |
7038 |
}, |
7039 |
"----------\n" + |
7040 |
"1. WARNING in X.java (at line 4)\n" + |
7041 |
" private void c() {}\n" + |
7042 |
" ^^^\n" + |
7043 |
"The method c() from the type X is never used locally\n" + |
7044 |
"----------\n" + |
7045 |
"2. ERROR in X.java (at line 8)\n" + |
7046 |
" a(null);\n" + |
7047 |
" ^\n" + |
7048 |
"The method a(String) from the type X is not visible\n" + |
7049 |
"----------\n" + |
7050 |
"3. WARNING in X.java (at line 14)\n" + |
7051 |
" a(null);\n" + |
7052 |
" ^^^^^^^\n" + |
7053 |
"Access to enclosing method a(String) from the type X is emulated by a synthetic accessor method\n" + |
7054 |
"----------\n" + |
7055 |
"4. WARNING in X.java (at line 15)\n" + |
7056 |
" c(null);\n" + |
7057 |
" ^^^^^^^\n" + |
7058 |
"Access to enclosing method c(String) from the type X is emulated by a synthetic accessor method\n" + |
7059 |
"----------\n" |
7060 |
); |
7061 |
} |
7015 |
public static Class testClass() { |
7062 |
public static Class testClass() { |
7016 |
return InnerEmulationTest.class; |
7063 |
return InnerEmulationTest.class; |
7017 |
} |
7064 |
} |