}
@Override
public void visitName(GoTypeName type, List<Reference> data, TypeVisitor<List<Reference>> visitor) {
data.add(new InterfaceMethodReference(ident, type));
data.add(new MethodReference(ident, type));
// HACK: I should not have to do this here
if (type != type.underlyingType() && !(type.underlyingType() instanceof GoTypeName))
type.underlyingType().accept(visitor);
}
@Override
public void visitPrimitive(GoTypePrimitive type, List<Reference> data, TypeVisitor<List<Reference>> visitor) {
data.add(new MethodReference(ident, type));
}
@Override
public void visitStruct(GoTypeStruct type, List<Reference> data, TypeVisitor<List<Reference>> visitor) {
data.add(new StructFieldReference(ident, type));