We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
md5: 8f9ccb58affa5fbf69f6c4b67da4514b
duplicates:
Issue Description:
Related forum post here.
protocol Fooable { func foo() } protocol Barable { func bar() } protocol Foobarable : Fooable, Barable { } // Conditionally conforming Array to Foobarable works as expected: extension Array: Foobarable where Element: Foobarable { func foo() { forEach { $0.foo() } } func bar() { forEach { $0.bar() } } } // And it also works on eg Optional: extension Optional: Foobarable where Wrapped: Foobarable { func foo() { self?.foo() } func bar() { self?.bar() } } // But, for some reason, it doesn't work on for example this: struct MyArrayOfOne<Element> { let element: Element } extension MyArrayOfOne: Foobarable where Element: Foobarable { // <- Error func foo() { element.foo() } func bar() { element.bar() } } // Error: Type 'MyArrayOfOne<Element>' does not conform to protocol 'Barable'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Additional Detail from JIRA
md5: 8f9ccb58affa5fbf69f6c4b67da4514b
duplicates:
Issue Description:
Related forum post here.
The text was updated successfully, but these errors were encountered: