Created
December 6, 2015 07:16
-
-
Save stigi/c5c449a701d75cc86911 to your computer and use it in GitHub Desktop.
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 MyProtocol { | |
static func staticHello()->() | |
func hello()->() | |
} | |
// default implementation | |
extension MyProtocol { | |
static func staticHello()->() { | |
print("static bello") | |
} | |
func hello()->() { | |
// staticHello() // How can I call staticHello() from here? | |
} | |
} | |
struct MyStruct: MyProtocol { | |
} | |
MyStruct().hello() | |
MyStruct.staticHello() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment