Curious what part of generics the below would fall under? This hit me by
surprise/makes even non-generic/Self-depending protocols un-interchangeable
with classes..

protocol Special {}

func doWithAndReturn<S: Special>(_ special: S) -> S { ... }

let special: Special = ...

// "error: Generics parameter 'S' could not be inferred"
// works fine when 'Special' is a class
let newSpecial: Special = doWithAndReturn(special)
swift-evolution mailing list

Reply via email to