Skip to content

Instantly share code, notes, and snippets.

@kateinoigakukun
Created January 15, 2019 15:20
Show Gist options
  • Save kateinoigakukun/dfb8e715202c38b86d17d222c1e2e3ed to your computer and use it in GitHub Desktop.
Save kateinoigakukun/dfb8e715202c38b86d17d222c1e2e3ed to your computer and use it in GitHub Desktop.
protocol P1 {
associatedtype X
}
protocol P2 {}
struct Box<T1, T2: P1> {
struct X {}
}
extension Box.X: P2 where T2.X == String {}
extension String: P1 {
typealias X = String
}
_ = Box<Int, String>.X.self is P2.Type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment