Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftgenerics and constraintsSingle-choice MCQ

Given two overloads selected by generic constraints, which one does this call resolve to?

func describe<T>(_ x: T) -> String { "any" } func describe<T: CustomStringConvertible>(_ x: T) -> String { "described" } print(describe(42))