8057652: Request to improve error messages for labeled declarations
Summary: Parse labeled statements as block statements to improve error recovery for labeled declarations; related cleanup.
Reviewed-by: jjg
/*
* @test /nodynamiccopyright/
* @bug 1241001
* @summary The compiler failed to detect duplicate, nested labels.
* @author turnidge
*
* @compile/fail/ref=NestedDuplicateLabels.out -XDrawDiagnostics NestedDuplicateLabels.java
*/
class NestedDuplicateLabels {
void method() {
foo: { { foo: {} } }
}
}