the.bay.news

Potential bug in protocol extensions

Swift Forums
Potential bug in protocol extensions
This fragment compiles fine: protocol P { func instanceReq(_ v: String) -> Int func instanceReq(_ v: String?) -> Int? static func staticReq(_ v: String) -> Int static func staticReq(_ v: String?) -> Int? } struct S: P { func instanceReq(_ v: String) -> Int { 0 } func instanceReq(_ v: String?) -> Int? { instanceReq("") } // ✅ func instanceNotReq(_ v: String) -> Int { 0 } func instanceNotReq(_ v: String?) -> Int? { instanceNotReq("") } // ✅ static ...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.