Type argument is not within its bounds Expected: Parcelable Found: String
问题 I am creating a generic, abstract class like this: abstract class BaseDialogFragment<T: Parcelable> : DialogFragment() Trying to implement this class as class MyDialogFragment : BaseDialogFragment<String>() gives me Type argument is not within its bounds Expected: Parcelable Found: String for the String in BaseDialogFragment<String>() . So, how can I use String as a value for T ? Is my condition T: Parcelable somehow wrong, if I want T to be a parcelable type? 回答1: So, how can I use String as