Lines 4984-4987
Link Here
|
4984 |
"TheFieldDeclaratation cannot be resolved to a type\n" + |
4984 |
"TheFieldDeclaratation cannot be resolved to a type\n" + |
4985 |
"----------\n"); |
4985 |
"----------\n"); |
4986 |
} |
4986 |
} |
|
|
4987 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660 |
4988 |
public void test098() { |
4989 |
this.runNegativeTest( |
4990 |
new String[] { |
4991 |
"X.java", |
4992 |
"public class X {\n" + |
4993 |
" private class A {\n" + |
4994 |
" public void foo(int a) {\n" + |
4995 |
" System.out.println(\"Hello\");\n" + |
4996 |
" }\n" + |
4997 |
" public void foo(float a) {\n" + |
4998 |
" System.out.println(\"Hello\");\n" + |
4999 |
" }\n" + |
5000 |
" public void foo(boolean a) {\n" + |
5001 |
" System.out.println(\"Hello\");\n" + |
5002 |
" }\n" + |
5003 |
" public void foo(Integer a) {\n" + |
5004 |
" System.out.println(\"Hello\");\n" + |
5005 |
" }\n" + |
5006 |
" }\n" + |
5007 |
" private class B extends A {\n" + |
5008 |
" public void foo(int a) {\n" + |
5009 |
" System.out.println(\"Hello\");\n" + |
5010 |
" }\n" + |
5011 |
" public void foo(float a) {\n" + |
5012 |
" System.out.println(\"Hello\");\n" + |
5013 |
" }\n" + |
5014 |
" public void foo(double a) {\n" + |
5015 |
" System.out.println(\"Hello\");\n" + |
5016 |
" }\n" + |
5017 |
" public void foo(char a) {\n" + |
5018 |
" System.out.println(\"Hello\");\n" + |
5019 |
" }\n" + |
5020 |
" }\n" + |
5021 |
"}\n" |
5022 |
}, |
5023 |
"----------\n" + |
5024 |
"1. WARNING in X.java (at line 3)\n" + |
5025 |
" public void foo(int a) {\n" + |
5026 |
" ^^^^^^^^^^\n" + |
5027 |
"The method foo(int) from the type X.A is never used locally\n" + |
5028 |
"----------\n" + |
5029 |
"2. WARNING in X.java (at line 6)\n" + |
5030 |
" public void foo(float a) {\n" + |
5031 |
" ^^^^^^^^^^^^\n" + |
5032 |
"The method foo(float) from the type X.A is never used locally\n" + |
5033 |
"----------\n" + |
5034 |
"3. WARNING in X.java (at line 9)\n" + |
5035 |
" public void foo(boolean a) {\n" + |
5036 |
" ^^^^^^^^^^^^^^\n" + |
5037 |
"The method foo(boolean) from the type X.A is never used locally\n" + |
5038 |
"----------\n" + |
5039 |
"4. WARNING in X.java (at line 12)\n" + |
5040 |
" public void foo(Integer a) {\n" + |
5041 |
" ^^^^^^^^^^^^^^\n" + |
5042 |
"The method foo(Integer) from the type X.A is never used locally\n" + |
5043 |
"----------\n" + |
5044 |
"5. WARNING in X.java (at line 16)\n" + |
5045 |
" private class B extends A {\n" + |
5046 |
" ^\n" + |
5047 |
"The type X.B is never used locally\n" + |
5048 |
"----------\n" + |
5049 |
"6. WARNING in X.java (at line 16)\n" + |
5050 |
" private class B extends A {\n" + |
5051 |
" ^\n" + |
5052 |
"Access to enclosing constructor X.A() is emulated by a synthetic accessor method\n" + |
5053 |
"----------\n" + |
5054 |
"7. WARNING in X.java (at line 23)\n" + |
5055 |
" public void foo(double a) {\n" + |
5056 |
" ^^^^^^^^^^^^^\n" + |
5057 |
"The method foo(double) from the type X.B is never used locally\n" + |
5058 |
"----------\n" + |
5059 |
"8. WARNING in X.java (at line 26)\n" + |
5060 |
" public void foo(char a) {\n" + |
5061 |
" ^^^^^^^^^^^\n" + |
5062 |
"The method foo(char) from the type X.B is never used locally\n" + |
5063 |
"----------\n"); |
5064 |
} |
5065 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660 |
5066 |
public void test098b() { |
5067 |
this.runNegativeTest( |
5068 |
new String[] { |
5069 |
"X.java", |
5070 |
"public class X {\n" + |
5071 |
" private class A {\n" + |
5072 |
" public void foo(int a) {\n" + |
5073 |
" System.out.println(\"Hello\");\n" + |
5074 |
" }\n" + |
5075 |
" public void foo(float a) {\n" + |
5076 |
" System.out.println(\"Hello\");\n" + |
5077 |
" }\n" + |
5078 |
" public void foo(boolean a) {\n" + |
5079 |
" System.out.println(\"Hello\");\n" + |
5080 |
" }\n" + |
5081 |
" public void foo(Integer a) {\n" + |
5082 |
" System.out.println(\"Hello\");\n" + |
5083 |
" }\n" + |
5084 |
" }\n" + |
5085 |
" private class B extends A {\n" + |
5086 |
" public void foo(int a) {\n" + |
5087 |
" System.out.println(\"Hello\");\n" + |
5088 |
" }\n" + |
5089 |
" public void foo(float a) {\n" + |
5090 |
" System.out.println(\"Hello\");\n" + |
5091 |
" }\n" + |
5092 |
" public void foo(double a) {\n" + |
5093 |
" System.out.println(\"Hello\");\n" + |
5094 |
" }\n" + |
5095 |
" public void foo(char a) {\n" + |
5096 |
" System.out.println(\"Hello\");\n" + |
5097 |
" }\n" + |
5098 |
" }\n" + |
5099 |
" public class C extends B {\n" + |
5100 |
" public void foo(int a) {\n" + |
5101 |
" System.out.println(\"Hello\");\n" + |
5102 |
" }\n" + |
5103 |
" public void foo(double a) {\n" + |
5104 |
" System.out.println(\"Hello\");\n" + |
5105 |
" }\n" + |
5106 |
" public void foo(boolean a) {\n" + |
5107 |
" System.out.println(\"Hello\");\n" + |
5108 |
" }\n" + |
5109 |
" public void foo(byte a) {\n" + |
5110 |
" System.out.println(\"Hello\");\n" + |
5111 |
" }\n" + |
5112 |
" }\n" + |
5113 |
"}\n" |
5114 |
}, |
5115 |
"----------\n" + |
5116 |
"1. WARNING in X.java (at line 3)\n" + |
5117 |
" public void foo(int a) {\n" + |
5118 |
" ^^^^^^^^^^\n" + |
5119 |
"The method foo(int) from the type X.A is never used locally\n" + |
5120 |
"----------\n" + |
5121 |
"2. WARNING in X.java (at line 6)\n" + |
5122 |
" public void foo(float a) {\n" + |
5123 |
" ^^^^^^^^^^^^\n" + |
5124 |
"The method foo(float) from the type X.A is never used locally\n" + |
5125 |
"----------\n" + |
5126 |
"3. WARNING in X.java (at line 9)\n" + |
5127 |
" public void foo(boolean a) {\n" + |
5128 |
" ^^^^^^^^^^^^^^\n" + |
5129 |
"The method foo(boolean) from the type X.A is never used locally\n" + |
5130 |
"----------\n" + |
5131 |
"4. WARNING in X.java (at line 16)\n" + |
5132 |
" private class B extends A {\n" + |
5133 |
" ^\n" + |
5134 |
"Access to enclosing constructor X.A() is emulated by a synthetic accessor method\n" + |
5135 |
"----------\n" + |
5136 |
"5. WARNING in X.java (at line 23)\n" + |
5137 |
" public void foo(double a) {\n" + |
5138 |
" ^^^^^^^^^^^^^\n" + |
5139 |
"The method foo(double) from the type X.B is never used locally\n" + |
5140 |
"----------\n" + |
5141 |
"6. WARNING in X.java (at line 30)\n" + |
5142 |
" public class C extends B {\n" + |
5143 |
" ^\n" + |
5144 |
"Access to enclosing constructor X.B() is emulated by a synthetic accessor method\n" + |
5145 |
"----------\n"); |
5146 |
} |
5147 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660 |
5148 |
public void test098c() { |
5149 |
this.runNegativeTest( |
5150 |
new String[] { |
5151 |
"X.java", |
5152 |
"public class X {\n" + |
5153 |
" private class A {\n" + |
5154 |
" public void foo() {}\n" + |
5155 |
" }\n" + |
5156 |
" public class B extends A {}\n" + |
5157 |
"}" |
5158 |
}, |
5159 |
"----------\n" + |
5160 |
"1. WARNING in X.java (at line 5)\n" + |
5161 |
" public class B extends A {}\n" + |
5162 |
" ^\n" + |
5163 |
"Access to enclosing constructor X.A() is emulated by a synthetic accessor method\n" + |
5164 |
"----------\n"); |
5165 |
} |
5166 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660 |
5167 |
public void test098d() { |
5168 |
this.runNegativeTest( |
5169 |
new String[] { |
5170 |
"X.java", |
5171 |
"public class X {\n" + |
5172 |
" private class A {\n" + |
5173 |
" public void foo() {}\n" + |
5174 |
" public void foo(int a) {}\n" + |
5175 |
" }\n" + |
5176 |
" public class B extends A {}\n" + |
5177 |
"}" |
5178 |
}, |
5179 |
"----------\n" + |
5180 |
"1. WARNING in X.java (at line 6)\n" + |
5181 |
" public class B extends A {}\n" + |
5182 |
" ^\n" + |
5183 |
"Access to enclosing constructor X.A() is emulated by a synthetic accessor method\n" + |
5184 |
"----------\n"); |
5185 |
} |
5186 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660 |
5187 |
public void test098e() { |
5188 |
this.runNegativeTest( |
5189 |
new String[] { |
5190 |
"X.java", |
5191 |
"public class X {\n" + |
5192 |
" private class A {\n" + |
5193 |
" private void foo() {}\n" + |
5194 |
" private void foo(int a) {}\n" + |
5195 |
" }\n" + |
5196 |
" public class B extends A {}\n" + |
5197 |
"}" |
5198 |
}, |
5199 |
"----------\n" + |
5200 |
"1. WARNING in X.java (at line 3)\n" + |
5201 |
" private void foo() {}\n" + |
5202 |
" ^^^^^\n" + |
5203 |
"The method foo() from the type X.A is never used locally\n" + |
5204 |
"----------\n" + |
5205 |
"2. WARNING in X.java (at line 4)\n" + |
5206 |
" private void foo(int a) {}\n" + |
5207 |
" ^^^^^^^^^^\n" + |
5208 |
"The method foo(int) from the type X.A is never used locally\n" + |
5209 |
"----------\n" + |
5210 |
"3. WARNING in X.java (at line 6)\n" + |
5211 |
" public class B extends A {}\n" + |
5212 |
" ^\n" + |
5213 |
"Access to enclosing constructor X.A() is emulated by a synthetic accessor method\n" + |
5214 |
"----------\n"); |
5215 |
} |
5216 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660 |
5217 |
public void test098f() { |
5218 |
this.runNegativeTest( |
5219 |
new String[] { |
5220 |
"X.java", |
5221 |
"public class X {\n" + |
5222 |
" private class A {\n" + |
5223 |
" public void foo() {}\n" + |
5224 |
" public void foo(int a) {}\n" + |
5225 |
" }\n" + |
5226 |
" private class B extends A {}\n" + |
5227 |
"}" |
5228 |
}, |
5229 |
"----------\n" + |
5230 |
"1. WARNING in X.java (at line 3)\n" + |
5231 |
" public void foo() {}\n" + |
5232 |
" ^^^^^\n" + |
5233 |
"The method foo() from the type X.A is never used locally\n" + |
5234 |
"----------\n" + |
5235 |
"2. WARNING in X.java (at line 4)\n" + |
5236 |
" public void foo(int a) {}\n" + |
5237 |
" ^^^^^^^^^^\n" + |
5238 |
"The method foo(int) from the type X.A is never used locally\n" + |
5239 |
"----------\n" + |
5240 |
"3. WARNING in X.java (at line 6)\n" + |
5241 |
" private class B extends A {}\n" + |
5242 |
" ^\n" + |
5243 |
"The type X.B is never used locally\n" + |
5244 |
"----------\n" + |
5245 |
"4. WARNING in X.java (at line 6)\n" + |
5246 |
" private class B extends A {}\n" + |
5247 |
" ^\n" + |
5248 |
"Access to enclosing constructor X.A() is emulated by a synthetic accessor method\n" + |
5249 |
"----------\n"); |
5250 |
} |
4987 |
} |
5251 |
} |