I have two custom mappable models
class FirstModel: Mappable, CustomProtocol {
}
class SecondModel: FirstModel {
}
And another class like this
class SomeViewController<T: CustomProtocol>: AnotherViewConyroller<T> {
}
Now, in one of my viewController, i'm trying to assign different Model to reuse the current class.
var controller = SomeViewController<FirstModel>
controller = SomeViewController<SecondModel>
On the last line, i'm getting this error
Cannot assign value of type SomeViewController<FirstModel> to type
SomeViewController<SecondModel>
I don't know am i doing wrong. FirstModel is conforming to CustomProtocol and SecondModel is subclassing it.