You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extensionCollection {
typealiasR = Element
}
funcfoo<U: Collection, T>(_arg: U) whereU.R == T {}
// 'U' does not have a member type named 'R'; did you mean 'R'?protocolP {
associatedtypeFoo: Collection
}
extensionP { typealiasElement = Foo.Element }
funcfoo<U: P, T>(_arg: U) whereU.Element == T {} // Ok
The text was updated successfully, but these errors were encountered:
x.swift:5:46: error: 'R' wasdefined in extensionofprotocol 'Collection' and cannot be referenced from a 'where' clause
func foo<U:Collection,T>(_ arg:U)where U.R ==T{}
^
x.swift:5:25: error: generic parameter 'T' is not used in function signature
func foo<U:Collection,T>(_ arg:U)where U.R ==T{}
^
x.swift:13:37: error: 'Element' wasdefined in extensionofprotocol 'P' and cannot be referenced from a 'where' clause
func foo<U:P,T>(_ arg:U)where U.Element ==T{}// Ok
^
x.swift:11:25: note: consider moving 'Element' into the definition of protocol 'P'
extensionP{typealiasElement=Foo.Element}
^
x.swift:13:16: error: generic parameter 'T' is not used in function signature
func foo<U:P,T>(_ arg:U)where U.Element ==T{}// Ok
Environment
Xcode 9.4.1 (9F2000)
Additional Detail from JIRA
md5: c318547b7dea44e767266078f5c0a83d
Issue Description:
The text was updated successfully, but these errors were encountered: