class JsonSerializer<T> { public JsonSerializer(Class<T> type){Serializer<Map<String, byte[]>> serializer = new JsonSerializer<Map<String, byte[]>>(Map<String, byte[]>
为什么我在返回popupFactory(...)时得到错误“类型'AbstractPopup‘不能赋值给类型T”方法?请忽略其他错误,这只是一个测试代码,以便更好地理解泛型是如何工作的。function popupFactory<T extends AbstractPopup>(popupType: PopupType, data: {}): T var popup: AbstractPopuppopup = new