Skip to content

Instantly share code, notes, and snippets.

@mtitolo
Created November 10, 2015 20:04
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 mtitolo/48cafe29fdc7fd810b01 to your computer and use it in GitHub Desktop.
Save mtitolo/48cafe29fdc7fd810b01 to your computer and use it in GitHub Desktop.
Protocol Inheritance
protocol A {}
protocol B: A {}
protocol C {
var something: A { get set }
}
struct BB: B {}
struct D: C { // Type 'D' does not conform to protocol 'C'
var something: B = BB()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment