I am a bit confused. Please look at this example.
I created a VM protocol:
protocol VM {
}
And this protocol is using in my VC implementation
final class VC: UIViewController {
let viewModel: VM
}
Now I create special new protocols
protocol AwesomeProtocol {
}
protocol AwesomeViewProtocol {
var viewModel: AwesomeProtocol { get }
}
My idea is to expand VM
with Awesomeness
so:
protocol VM: AwesomeProtocol {
}
final class VC: UIViewController, AwesomeViewProtocol {
let viewModel: VM
}
But here I met an compiler error:
Type 'VC' does not conform to protocol 'AwesomeViewProtocol'
Despite the fact that VM
extend AwesomeProtocol
Someone could explain me what am I doing wrong?