7159445: (javac) emits inaccurate diagnostics for enhanced for-loops

Reviewed-by: jjg
This commit is contained in:
Jan Lahoda 2012-05-10 12:32:58 -07:00 committed by Kumar Srinivasan
parent 324e987e82
commit 9feb7f3e15
4 changed files with 48 additions and 5 deletions

View file

@ -23,7 +23,7 @@
/*
* @test
* @bug 7073631
* @bug 7073631 7159445
* @summary tests error and diagnostics positions
* @author Jan Lahoda
*/
@ -875,6 +875,7 @@ public class JavacParserTest extends TestCase {
testMissingClassError();
testSwitchError();
testMethodError();
testErrorRecoveryForEnhancedForLoop142381();
}
public static void main(String... args) throws IOException {
@ -892,8 +893,10 @@ abstract class TestCase {
}
}
void assertFalse(String message, boolean empty) {
throw new UnsupportedOperationException("Not yet implemented");
void assertFalse(String message, boolean bvalue) {
if (bvalue == true) {
fail(message);
}
}
void assertEquals(String message, int i, long l) {