3 | let animal = Animal() 4 | let mirror = Mirror(reflecting: animal) | `- error: 'Mirror' is unavailable w ϥϯλΠϜ࣌ʹར༻͍ͯ͠Δػೳར༻Ͱ͖ͳ͍ w ϝλσʔλΛ͍ΕΔͱόΠφϦαΠζ͕େ͖͘ͳΔ w 04ͱҧ͍EMPQFOEMTZNͳͲ͕ແ͍ protocol Animal { var name: String { get } } struct Dog: Animal { var name: String { "🐕" } } func sayName(animal: any Animal) { print(animal.name) } let dog = Dog() sayName(animal: dog) /* 28 | let dog = Dog() 29 | say(animal: dog) | `- error: cannot use a value of protocol type 'any Animal' in embedded Swift */
ඞཁͳ߹खಈͰ6OJDPEFϥΠϒϥϦΛϦϯΫΛ͢Δඞཁ͕͋Δ w MJCTXJGUFNCFEEFEBSNWNOPOFOPOFFBCJMJCTXJGU6OJDPEF%BUB5BCMFTB 4USJOH 6OEF fi OFETZNCPMTGPSBSDIJUFDUVSFBSN @@TXJGU@TUEMJC@HFU$PNQPTJUJPO SFGFSFODFEGSPN