Is there any better way to get existential type’s actual type in lldb
protocol Car { func printCar() } struct SportsCar : Car { func printCar() { } } func generateSportsCar() -> any Car { return SportsCar() } func test() { let obj = generateSportsCar() obj.printCar() } the generateSportsCar is return a existential type (any car) , But if I print the obj in the lldb : Printing […]
why the existential type is erased in this code?
protocol Car { func printCar() } struct SportsCar : Car { func printCar() { } } func generateSportsCar() -> any Car { return SportsCar() } func test() { let obj = generateSportsCar() obj.printCar() } the generateSportsCar is return a existential type (any car) , But if I print the obj in the lldb : Printing […]