Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freddi-kit/3ef4da9ab1135f905c188250d7ab42bb to your computer and use it in GitHub Desktop.
Save freddi-kit/3ef4da9ab1135f905c188250d7ab42bb to your computer and use it in GitHub Desktop.
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