test/tools/javac/processing/model/type/NoTypes.java
Print this page
*** 87,97 ****
verifyKind(VOID, types.getNoType(VOID));
verifyKind(NONE, types.getNoType(NONE));
// The return type of a constructor or void method is VOID.
! class Scanner extends ElementScanner6<Void, Void> {
@Override
public Void visitExecutable(ExecutableElement e, Void p) {
verifyKind(VOID, e.getReturnType());
ExecutableType t = (ExecutableType) e.asType();
verifyKind(VOID, t.getReturnType());
--- 87,97 ----
verifyKind(VOID, types.getNoType(VOID));
verifyKind(NONE, types.getNoType(NONE));
// The return type of a constructor or void method is VOID.
! class Scanner extends ElementScanner7<Void, Void> {
@Override
public Void visitExecutable(ExecutableElement e, Void p) {
verifyKind(VOID, e.getReturnType());
ExecutableType t = (ExecutableType) e.asType();
verifyKind(VOID, t.getReturnType());
*** 102,115 ****
new Scanner().scan(c);
}
/**
* Verify that a NoType instance is of a particular kind,
! * and that TypeKindVisitor6 properly dispatches on it.
*/
private void verifyKind(TypeKind kind, TypeMirror type) {
! class Vis extends TypeKindVisitor6<TypeKind, Void> {
@Override
public TypeKind visitNoTypeAsVoid(NoType t, Void p) {
return VOID;
}
@Override
--- 102,115 ----
new Scanner().scan(c);
}
/**
* Verify that a NoType instance is of a particular kind,
! * and that TypeKindVisitor7 properly dispatches on it.
*/
private void verifyKind(TypeKind kind, TypeMirror type) {
! class Vis extends TypeKindVisitor7<TypeKind, Void> {
@Override
public TypeKind visitNoTypeAsVoid(NoType t, Void p) {
return VOID;
}
@Override