-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself
Description
Previous ID | SR-5610 |
Radar | None |
Original Reporter | @jepers |
Type | Bug |
Status | Closed |
Resolution | Done |
Environment
Xcode 9 beta 4, dev snapshot 2017-07-31
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug |
Assignee | @DougGregor |
Priority | Medium |
md5: f0aea715c2c4dc6b1e1eb164db9de82a
Issue Description:
protocol P1 {
associatedtype X: P2 where X.Q == Self, X.R == UInt8
}
struct A: P1 {
typealias X = S<UInt8>
}
protocol P2 {
associatedtype Q: P1
associatedtype R
}
struct S<E> : P2 {
typealias R = E
typealias Q = A
}
extension P2 {
func map<T>(transform: (R) -> T.R) -> T
where T: P2, Q == T.Q // <-- Incorrect warning here:
// ^----------------------------------------------------------.
// Redundant same-type constraint 'Self.Q' == 'T.Q' |
// Previous same-type constraint 'T.Q' == 'T.Q.X.Q' implied here -'
{
fatalError() // <-- Not important ...
}
}
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself