[SR-6474] Conditional conformance to refined protocol inappropriately fails #49024
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
conditional conformances
Feature → protocol → conformances: conditional conformances
Environment
Swift snapshot 2017-11-24 (a)
Additional Detail from JIRA
md5: 831a0c9866177c91e932d3d199ddbb0c
duplicates:
is duplicated by:
relates to:
Issue Description:
The following code fails to compile with the 2017-11-24 snapshot.
Changing
extension S : Q where...
toextension S : P where...
allows the code to compile, but of courseS : Q
should implyS : P
.Meanwhile, that workaround never permits
S
to conform toQ
. That is, the following fails to compile:(The practical upshot of this is that
StrideTo
cannot conditionally conform toRandomAccessCollection
because that protocol exists in a hierarchy refining other protocols.)The text was updated successfully, but these errors were encountered: