code: void registerTypeImplementingInterface(
        FunctionType type, ObjectType interfaceInstance) {
      interfaceToImplementors.put(interfaceInstance.getReferenceName(), type);
    }
docs: Tells the type system that {@code type} implements interface {@code
  interfaceInstance}.
  {@code inter} must be an ObjectType for the instance of the interface as it
  could be a named type and not yet have the constructor.