JavaCompilerCore/resources/bytecode/javFiles/Bug307.jav

45 lines
659 B
Plaintext
Raw Normal View History

2024-03-26 10:04:03 +00:00
public class Bug307 {
public void main() {
IVisitor v = new Visitor();
Impl2 f = new Impl2();
f.accept(v);
}
}
interface IVisitor {
void visit(Impl1 f);
void visit(Impl2 fb);
}
interface IAcceptor {
void accept(IVisitor v);
}
class Visitor implements IVisitor {
@Override
public void visit(Impl1 f) {
}
@Override
public void visit(Impl2 fb) {
}
}
class Impl1 implements IAcceptor {
@Override
public void accept(IVisitor v) {
v.visit(this);
}
}
class Impl2 implements IAcceptor {
@Override
public void accept(IVisitor v) {
v.visit(this);
}
}