Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2011 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 27-33
Link Here
|
27 |
// Static initializer to specify tests subset using TESTS_* static variables |
27 |
// Static initializer to specify tests subset using TESTS_* static variables |
28 |
// All specified tests which does not belong to the class are skipped... |
28 |
// All specified tests which does not belong to the class are skipped... |
29 |
static { |
29 |
static { |
30 |
// TESTS_NAMES = new String[] { "test322531j" }; |
30 |
// TESTS_NAMES = new String[] { "test335751" }; |
31 |
// TESTS_NAMES = new String[] { "test1464" }; |
31 |
// TESTS_NAMES = new String[] { "test1464" }; |
32 |
// TESTS_NUMBERS = new int[] { 1465 }; |
32 |
// TESTS_NUMBERS = new int[] { 1465 }; |
33 |
// TESTS_RANGE = new int[] { 1097, -1 }; |
33 |
// TESTS_RANGE = new int[] { 1097, -1 }; |
Lines 1304-1307
Link Here
|
1304 |
"Zork cannot be resolved to a type\n" + |
1304 |
"Zork cannot be resolved to a type\n" + |
1305 |
"----------\n"); |
1305 |
"----------\n"); |
1306 |
} |
1306 |
} |
|
|
1307 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=335751 ([1.7][compiler] Cycle inheritance in type arguments is not detected) |
1308 |
public void test335751() { |
1309 |
this.runNegativeTest( |
1310 |
new String[] { |
1311 |
"X.java", |
1312 |
"public class X<A extends B, B extends A> {}\n" |
1313 |
}, |
1314 |
this.complianceLevel <= ClassFileConstants.JDK1_6 ? |
1315 |
"----------\n" + |
1316 |
"1. ERROR in X.java (at line 1)\n" + |
1317 |
" public class X<A extends B, B extends A> {}\n" + |
1318 |
" ^\n" + |
1319 |
"Illegal forward reference to type parameter B\n" + |
1320 |
"----------\n" : |
1321 |
|
1322 |
// 1.7+ output. |
1323 |
"----------\n" + |
1324 |
"1. ERROR in X.java (at line 1)\n" + |
1325 |
" public class X<A extends B, B extends A> {}\n" + |
1326 |
" ^\n" + |
1327 |
"Cycle detected: a cycle exists in the type hierarchy between B and A\n" + |
1328 |
"----------\n"); |
1329 |
} |
1330 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=334121 ([1.7][compiler] Stackoverflow error if compiled in 1.7 compliance mode) |
1331 |
public void test334121() { |
1332 |
this.runNegativeTest( |
1333 |
new String[] { |
1334 |
"X.java", |
1335 |
"public class X<A extends A> {}\n" |
1336 |
}, |
1337 |
this.complianceLevel <= ClassFileConstants.JDK1_6 ? |
1338 |
"----------\n" + |
1339 |
"1. ERROR in X.java (at line 1)\n" + |
1340 |
" public class X<A extends A> {}\n" + |
1341 |
" ^\n" + |
1342 |
"Illegal forward reference to type parameter A\n" + |
1343 |
"----------\n" : |
1344 |
|
1345 |
// 1.7+ output. |
1346 |
"----------\n" + |
1347 |
"1. ERROR in X.java (at line 1)\n" + |
1348 |
" public class X<A extends A> {}\n" + |
1349 |
" ^\n" + |
1350 |
"Cycle detected: the type A cannot extend/implement itself or one of its own member types\n" + |
1351 |
"----------\n"); |
1352 |
} |
1307 |
} |
1353 |
} |