1
0
Fork 0
fenix/app/src/main/java/org/mozilla/fenix/utils/Do.kt

19 lines
524 B
Kotlin
Raw Normal View History

2019-04-06 06:24:28 +02:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
2019-04-06 06:24:28 +02:00
package org.mozilla.fenix.utils
2019-04-06 06:24:28 +02:00
object Do {
2019-07-23 23:15:46 +02:00
/**
* Indicates to the linter that the following when statement should be exhaustive.
*
* @sample Do exhaustive when (bool) {
* true -> Unit
* false -> Unit
* }
*/
2019-04-06 06:24:28 +02:00
inline infix fun <reified T> exhaustive(any: T?) = any
}