equal
deleted
inserted
replaced
87 |
87 |
88 verifyKind(VOID, types.getNoType(VOID)); |
88 verifyKind(VOID, types.getNoType(VOID)); |
89 verifyKind(NONE, types.getNoType(NONE)); |
89 verifyKind(NONE, types.getNoType(NONE)); |
90 |
90 |
91 // The return type of a constructor or void method is VOID. |
91 // The return type of a constructor or void method is VOID. |
92 class Scanner extends ElementScanner6<Void, Void> { |
92 class Scanner extends ElementScanner7<Void, Void> { |
93 @Override |
93 @Override |
94 public Void visitExecutable(ExecutableElement e, Void p) { |
94 public Void visitExecutable(ExecutableElement e, Void p) { |
95 verifyKind(VOID, e.getReturnType()); |
95 verifyKind(VOID, e.getReturnType()); |
96 ExecutableType t = (ExecutableType) e.asType(); |
96 ExecutableType t = (ExecutableType) e.asType(); |
97 verifyKind(VOID, t.getReturnType()); |
97 verifyKind(VOID, t.getReturnType()); |
102 new Scanner().scan(c); |
102 new Scanner().scan(c); |
103 } |
103 } |
104 |
104 |
105 /** |
105 /** |
106 * Verify that a NoType instance is of a particular kind, |
106 * Verify that a NoType instance is of a particular kind, |
107 * and that TypeKindVisitor6 properly dispatches on it. |
107 * and that TypeKindVisitor7 properly dispatches on it. |
108 */ |
108 */ |
109 private void verifyKind(TypeKind kind, TypeMirror type) { |
109 private void verifyKind(TypeKind kind, TypeMirror type) { |
110 class Vis extends TypeKindVisitor6<TypeKind, Void> { |
110 class Vis extends TypeKindVisitor7<TypeKind, Void> { |
111 @Override |
111 @Override |
112 public TypeKind visitNoTypeAsVoid(NoType t, Void p) { |
112 public TypeKind visitNoTypeAsVoid(NoType t, Void p) { |
113 return VOID; |
113 return VOID; |
114 } |
114 } |
115 @Override |
115 @Override |