KT-20357: Add a sample for requireNotNull

This commit is contained in:
Yuya Urano
2020-10-30 08:15:48 +09:00
committed by GitHub
parent 2b03c10941
commit 18672c99ca
2 changed files with 26 additions and 1 deletions
@@ -54,7 +54,7 @@ public inline fun <T : Any> requireNotNull(value: T?): T {
* Throws an [IllegalArgumentException] with the result of calling [lazyMessage] if the [value] is null. Otherwise
* returns the not null value.
*
* @sample samples.misc.Preconditions.failRequireWithLazyMessage
* @sample samples.misc.Preconditions.failRequireNotNullWithLazyMessage
*/
@kotlin.internal.InlineOnly
public inline fun <T : Any> requireNotNull(value: T?, lazyMessage: () -> Any): T {