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

You model a builder with a phantom state parameter. What does the call to `.build()` below do?

enum Draft {} enum Ready {} struct Request<State> { var url: String } extension Request where State == Ready { func build() -> URLRequest { URLRequest(url: URL(string: url)!) } } let r = Request<Draft>(url: "https://x.com") r.build()