Created
November 10, 2015 20:04
-
-
Save mtitolo/48cafe29fdc7fd810b01 to your computer and use it in GitHub Desktop.
Protocol Inheritance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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