You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't use the existential 'any' keyword with @InjectedObject property wrapper, the fired error is: Type 'any Test' cannot conform to 'ObservableObject'
the example is as follows:
protocol Test: ObservableObject {
}
class MyViewModel: Test {
}
struct MyView: View {
@InjectedObject var viewModel: any Test //<---- the error fires here
var body: some View {
Text("Hello")
}
}