Created
January 22, 2019 17:28
-
-
Save westonal/6c4fc6d067238f2bd45246cf1c4ec9a7 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
/** | |
* When used at the end of a `when` block which return value's not used, forces all branches to be listed. | |
*/ | |
@Suppress("NOTHING_TO_INLINE") | |
inline fun <T> T?.exhaustive() = this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment