Calling non generic function from generic context swift
问题 I'm having issues with understanding how matching types in generic functions work in swift. I do not understand why my code is not compiling. This is what I have: enum LoadingState<T> { case idle case loading case failed(Error) case loaded(T) } private func updateInternal(_ state: Int) { print("=int") } private func updateInternal(_ state: String) { print("=string") } private func update<T>(_ state: LoadingState<T>) { switch state { case .loaded(let viewModel): updateInternal(viewModel)