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

What does this code print, given how generic type parameters interact with static properties?

struct Counter<T> { static var shared: Int { 0 } static func bump() -> String { String(describing: T.self) } } print(Counter<Int>.bump(), Counter<String>.bump())