code: void expectGeneratorSupertype(Node n, JSType type, String msg) {
      if (!getNativeType(GENERATOR_TYPE).isSubtypeOf(type)) {
        mismatch(n, msg, type, GENERATOR_TYPE);
      }
    }
docs: Expect the type to be a Generator or supertype of Generator.