Skip to content

Instantly share code, notes, and snippets.

@haranicle
Created February 16, 2016 10:04
Show Gist options
  • Save haranicle/82fe41f81669b70a6b38 to your computer and use it in GitHub Desktop.
Save haranicle/82fe41f81669b70a6b38 to your computer and use it in GitHub Desktop.
@es_kumagai 訂正!仰るとおり中でSelfを扱っているとダメでした。 #CodePiece
protocol P1 {
}
protocol P2 {
typealias A = Self
}
let arr1: Array<P1> = []
let arr2: Array<P2> = [] // Protocol 'P2' can only be used as a generic constraint because it has Self or associated type requirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment