Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftassociated typesSingle-choice MCQ

Given this protocol, why can't you write a stored property of type `Container` directly (e.g. `let c: Container`) in older Swift, and what is the modern fix?

protocol Container { associatedtype Item var first: Item { get } }