Re: [swift-users] question about covariant subtyping

2017-02-25 Thread Michael Roitzsch via swift-users
> They're both bugs, ultimately. Slava was just pointing out that the second > may be due to implementation limitations rather than oversight; either way, > we should ultimately remove the limitation. Thanks Joe. So created myself an account with the Swift JIRA. A variant of the first bug has a

Re: [swift-users] question about covariant subtyping

2017-02-23 Thread Joe Groff via swift-users
> On Feb 23, 2017, at 4:45 AM, Michael Roitzsch > wrote: > > So I understand that the first issue is a bug and the second may be a bug or > may be intentional. Would you advise that I file them both as bugs then? They're both bugs, ultimately. Slava was just pointing out that the second may

Re: [swift-users] question about covariant subtyping

2017-02-23 Thread Michael Roitzsch via swift-users
So I understand that the first issue is a bug and the second may be a bug or may be intentional. Would you advise that I file them both as bugs then? Michael ___ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/sw

Re: [swift-users] question about covariant subtyping

2017-02-22 Thread Slava Pestov via swift-users
It looks intentional. Function conversions can be performed on argument and return types that are related via ‘Subtype’ constraints in the constraint solver, however array conversions are only possible via the ‘Conversion’ relation. Changing this would require some additional work in SILGen to

Re: [swift-users] question about covariant subtyping

2017-02-22 Thread Joe Groff via swift-users
> On Feb 22, 2017, at 8:50 AM, Michael Roitzsch via swift-users > wrote: > > Hi all, > > I am fairly new to Swift, so this may very well be a simple misunderstanding > on my part. > > I was exploring the subtyping rules of Swift, especially regarding > covariance. I came across two examples

[swift-users] question about covariant subtyping

2017-02-22 Thread Michael Roitzsch via swift-users
Hi all, I am fairly new to Swift, so this may very well be a simple misunderstanding on my part. I was exploring the subtyping rules of Swift, especially regarding covariance. I came across two examples where the outcome puzzles me and I would appreciate if someone could explain this to me. F