Created
August 23, 2018 04:34
-
-
Save keizo042/694c06a7d3b3042d329c0796284c0d44 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
class Status{} | |
class Yet : Status{} | |
class Done: Status{} | |
class Once<T :Status> { | |
var value: int | |
static func get() -> OneTime<Yet> { | |
return Once<Yet>() | |
} | |
} | |
extension OnceImpl where T: Yet { | |
func get() { | |
return self.value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment