mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8043484: DPrinter does not compile
Make DPrinter compile Reviewed-by: jjg
This commit is contained in:
parent
577b60e711
commit
29e8b83b48
1 changed files with 13 additions and 9 deletions
|
@ -21,6 +21,12 @@
|
||||||
* questions.
|
* questions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* @test
|
||||||
|
* @bug 8043484
|
||||||
|
* @summary Make sure DPrinter.java compiles
|
||||||
|
* @compile DPrinter.java
|
||||||
|
*/
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
@ -403,7 +409,7 @@ public class DPrinter {
|
||||||
printType("type", sym.type, Details.SUMMARY);
|
printType("type", sym.type, Details.SUMMARY);
|
||||||
printType("erasure", sym.erasure_field, Details.SUMMARY);
|
printType("erasure", sym.erasure_field, Details.SUMMARY);
|
||||||
sym.accept(symVisitor, null);
|
sym.accept(symVisitor, null);
|
||||||
printAnnotations("annotations", sym.getAnnotations(), Details.SUMMARY);
|
printAnnotations("annotations", sym.getMetadata(), Details.SUMMARY);
|
||||||
indent(-1);
|
indent(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -529,11 +535,15 @@ public class DPrinter {
|
||||||
public class TreeVisitor extends JCTree.Visitor {
|
public class TreeVisitor extends JCTree.Visitor {
|
||||||
@Override
|
@Override
|
||||||
public void visitTopLevel(JCCompilationUnit tree) {
|
public void visitTopLevel(JCCompilationUnit tree) {
|
||||||
printList("packageAnnotations", tree.packageAnnotations);
|
printList("packageAnnotations", tree.getPackageAnnotations());
|
||||||
printTree("pid", tree.pid);
|
|
||||||
printList("defs", tree.defs);
|
printList("defs", tree.defs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void visitPackageDef(JCPackageDecl tree) {
|
||||||
|
printTree("pid", tree.pid);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visitImport(JCImport tree) {
|
public void visitImport(JCImport tree) {
|
||||||
printTree("qualid", tree.qualid);
|
printTree("qualid", tree.qualid);
|
||||||
|
@ -945,12 +955,6 @@ public class DPrinter {
|
||||||
* visit method for its superclass.
|
* visit method for its superclass.
|
||||||
*/
|
*/
|
||||||
public class TypeVisitor implements Type.Visitor<Void,Void> {
|
public class TypeVisitor implements Type.Visitor<Void,Void> {
|
||||||
public Void visitAnnotatedType(AnnotatedType type, Void ignore) {
|
|
||||||
printList("typeAnnotations", type.getAnnotationMirrors());
|
|
||||||
printType("underlyingType", type.unannotatedType(), Details.FULL);
|
|
||||||
return visitType(type, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Void visitArrayType(ArrayType type, Void ignore) {
|
public Void visitArrayType(ArrayType type, Void ignore) {
|
||||||
printType("elemType", type.elemtype, Details.FULL);
|
printType("elemType", type.elemtype, Details.FULL);
|
||||||
return visitType(type, null);
|
return visitType(type, null);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue