Created
January 6, 2020 10:09
-
-
Save freddi-kit/3ef4da9ab1135f905c188250d7ab42bb 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
extension SomeClass { | |
#if DEBUG | |
@available(*, deprecated, message: "Replace before releasing") | |
static func waitingReplace<X>(_ x: X) -> X { | |
return x | |
} | |
#else | |
@inline(__always) | |
@available(*, unavailable, message: "Replace before releasing") | |
static func waitingReplace<X>(_: X) -> X { | |
fatalError("Replace before releasing") | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment