Created
June 21, 2015 19:06
-
-
Save hartbit/45176895342030553cfc to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Value: Equatable { | |
} | |
protocol Smashable { | |
typealias T: Value | |
func valueBySmashingOtherValue(value: T) -> T | |
} | |
struct Foo : Value, Smashable { | |
typealias T = Bar | |
func valueBySmashingOtherValue(value: Bar) -> Bar { | |
return Bar() | |
} | |
} | |
func == (lhs: Foo, rhs: Foo) -> Bool { | |
return true | |
} | |
struct Bar: Value { | |
} | |
func == (lhs: Bar, rhs: Bar) -> Bool { | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment