8310314: Misplaced "unnamed classes are a preview feature and are disabled by default" error

Reviewed-by: jlaskey
This commit is contained in:
Jan Lahoda 2023-06-20 07:02:49 +00:00
parent 96a7db7b3c
commit 79069c5e74
3 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1,13 @@
/**
* @test /nodynamiccopyright/
* @bug 8310314
* @summary Ensure proper error position for the "unnamed classes not supported" error
* @compile/fail/ref=SourceLevelErrorPosition.out -XDrawDiagnostics SourceLevelErrorPosition.java
*/
class Nested {}
void main() {
System.err.println("");
}
void test() {
System.err.println("");
}