"any View cannot conform to View"

Hello,

What is the solution to this problem, assuming that you are not supposed to use AnyView, which I hear over and over again?

Given this protocol:

protocol MyProtocol {
    associatedtype V: View
    var content: () -> V { get }
}

if I want to store a heterogenous collection of MyProtocol,

let collection: [any MyProtocol], 

then the underlying V type of each is erased to any View, which (supposedly) does not conform to View.

Is there no way to "unbox" the existential any View to get the underlying View back? That unboxing idea is something I heard in a few WWDC videos but it seems like it does not apply to View.

"any View cannot conform to View"
 
 
Q