Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DougGregor/409c0aa37904f3d8862bacc67adfcaaa to your computer and use it in GitHub Desktop.
Save DougGregor/409c0aa37904f3d8862bacc67adfcaaa to your computer and use it in GitHub Desktop.
protocol Fooable {
associatedtype Foo
}
protocol Barrable {
associatedtype Bar: Fooable
}
struct X {}
struct Y: Fooable {
typealias Foo = X
}
struct Z: Barrable {
typealias Bar = Y
}
struct X2 { }
func test8<T: Barrable, U: Barrable>(_ t: T, u: U)
where T.Bar == Y, U.Bar.Foo == X2, T.Bar == U.Bar {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment