Debian Codegraph @

framework/tests/compound-checker/javac-error/JavaErrorTest.java

raw
1 class Test {
2 // Checking that if one checker finds a Java error
3 // and therefor does not set a root, then
4 // checkers relying on that checker should also not run.
5 // otherwise, it might access a subchecker whose "root" has not been set.
6 // (See AnnotatedTypeFactory.setRoot(CompilationUnitTree) )
7 void foo() {
8 Object a;
9 // :: error: variable a is already defined in method foo()
10 Object a;
11 }
12 }