We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
alsoIfNull
1 parent f3275cb commit da01309Copy full SHA for da01309
utils/common/src/main/kotlin/MiscUtils.kt
@@ -61,7 +61,7 @@ fun <R> temporaryProperties(vararg properties: Pair<String, String?>, block: ()
61
}
62
63
/**
64
- * Call [also] only if the receiver is null, e.g. for error handling, and return the receiver in any case.
+ * Call [block] only if the receiver is null, e.g. for error handling, and return the receiver in any case.
65
*/
66
inline fun <T> T.alsoIfNull(block: (T) -> Unit): T = this ?: also(block)
67
0 commit comments