Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardSwiftstatic vs dynamic witness dispatchSingle-choice MCQ

Two protocols both provide a default implementation of the same method via extensions, and a type conforms to both. There is no implementation in the type itself. What happens?

protocol A {} protocol B {} extension A { func run() { print("A") } } extension B { func run() { print("B") } } struct S: A, B {} S().run()