[swift-users] The case of broken polymorphism or "Cannot convert value of type to expected argument type"?

2017-02-16 Thread Isaac Rivera via swift-users
Hello, list! I am trying to find my way around Swift’s protocol limitations. It appears that in general, any protocol with declared associatedtype will break polymorphism? Take the case below which does not compile. All "Thing” instances are "Something” but they can’t be passed around or coerce

Re: [swift-users] The case of broken polymorphism or "Cannot convert value of type to expected argument type"?

2017-02-20 Thread Isaac Rivera via swift-users
are not related; in general, if > A is a subtype of B, then G is not a subtype of G. > > https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science) > > Slava > >> On Feb 16, 2017, at 9:05 AM, Isaac Rivera via swift-users >> wrote: >> &