Lines 44-50
Link Here
|
44 |
// All specified tests which do not belong to the class are skipped... |
44 |
// All specified tests which do not belong to the class are skipped... |
45 |
static { |
45 |
static { |
46 |
// TESTS_PREFIX = "testBug86380"; |
46 |
// TESTS_PREFIX = "testBug86380"; |
47 |
// TESTS_NAMES = new String[] { "testCreateBindings23" }; |
47 |
// TESTS_NAMES = new String[] { "test320802" }; |
48 |
// TESTS_NUMBERS = new int[] { 83230 }; |
48 |
// TESTS_NUMBERS = new int[] { 83230 }; |
49 |
// TESTS_RANGE = new int[] { 83304, -1 }; |
49 |
// TESTS_RANGE = new int[] { 83304, -1 }; |
50 |
} |
50 |
} |
Lines 2222-2226
Link Here
|
2222 |
deleteFile(filePath); |
2222 |
deleteFile(filePath); |
2223 |
} |
2223 |
} |
2224 |
} |
2224 |
} |
|
|
2225 |
public void test320802() throws CoreException { |
2226 |
String filePath = "/P/src/X.java"; |
2227 |
String filePathY = "/P/src/p/Y.java"; |
2228 |
try { |
2229 |
String contents = |
2230 |
"import p.Y;\n" + |
2231 |
"public class X {\n" + |
2232 |
" Y<MissingType1, MissingType2> y;\n" + |
2233 |
" public X() {\n" + |
2234 |
" this.y = new Y<MissingType1, MissingType2>();\n" + |
2235 |
" }\n" + |
2236 |
"}"; |
2237 |
createFile(filePath, contents); |
2238 |
ICompilationUnit compilationUnit = getCompilationUnit("P", "src", "", "X.java"); |
2239 |
assertTrue(compilationUnit.exists()); |
2225 |
|
2240 |
|
|
|
2241 |
String contents2 = |
2242 |
"package p;\n" + |
2243 |
"public class Y<T, U> {}"; |
2244 |
createFolder("/P/src/p"); |
2245 |
createFile(filePathY, contents2); |
2246 |
ICompilationUnit compilationUnit2 = getCompilationUnit("P", "src", "p", "Y.java"); |
2247 |
assertTrue(compilationUnit2.exists()); |
2248 |
|
2249 |
final CompilationUnit[] asts = new CompilationUnit[1]; |
2250 |
BindingRequestor requestor = new BindingRequestor() { |
2251 |
public void acceptAST(ICompilationUnit source, CompilationUnit ast) { |
2252 |
asts[0] = ast; |
2253 |
} |
2254 |
}; |
2255 |
resolveASTs( |
2256 |
new ICompilationUnit[] {compilationUnit}, |
2257 |
new String[0], |
2258 |
requestor, |
2259 |
getJavaProject("P"), |
2260 |
this.workingCopy.getOwner() |
2261 |
); |
2262 |
assertNotNull("No ast", asts[0]); |
2263 |
final IProblem[] problems = asts[0].getProblems(); |
2264 |
String expectedProblems = |
2265 |
"1. ERROR in /P/src/X.java (at line 3)\n" + |
2266 |
" Y<MissingType1, MissingType2> y;\n" + |
2267 |
" ^^^^^^^^^^^^\n" + |
2268 |
"MissingType1 cannot be resolved to a type\n" + |
2269 |
"----------\n" + |
2270 |
"2. ERROR in /P/src/X.java (at line 3)\n" + |
2271 |
" Y<MissingType1, MissingType2> y;\n" + |
2272 |
" ^^^^^^^^^^^^\n" + |
2273 |
"MissingType2 cannot be resolved to a type\n" + |
2274 |
"----------\n" + |
2275 |
"3. ERROR in /P/src/X.java (at line 5)\n" + |
2276 |
" this.y = new Y<MissingType1, MissingType2>();\n" + |
2277 |
" ^^^^^^\n" + |
2278 |
"MissingType1 cannot be resolved to a type\n" + |
2279 |
"----------\n" + |
2280 |
"4. ERROR in /P/src/X.java (at line 5)\n" + |
2281 |
" this.y = new Y<MissingType1, MissingType2>();\n" + |
2282 |
" ^^^^^^\n" + |
2283 |
"MissingType2 cannot be resolved to a type\n" + |
2284 |
"----------\n" + |
2285 |
"5. ERROR in /P/src/X.java (at line 5)\n" + |
2286 |
" this.y = new Y<MissingType1, MissingType2>();\n" + |
2287 |
" ^^^^^^^^^^^^\n" + |
2288 |
"MissingType1 cannot be resolved to a type\n" + |
2289 |
"----------\n" + |
2290 |
"6. ERROR in /P/src/X.java (at line 5)\n" + |
2291 |
" this.y = new Y<MissingType1, MissingType2>();\n" + |
2292 |
" ^^^^^^^^^^^^\n" + |
2293 |
"MissingType2 cannot be resolved to a type\n" + |
2294 |
"----------\n"; |
2295 |
assertProblems("Wrong problems", expectedProblems, problems, contents.toCharArray()); |
2296 |
} finally { |
2297 |
deleteFile(filePath); |
2298 |
} |
2299 |
} |
2226 |
} |
2300 |
} |