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.
1 parent d6c98fc commit 949a55aCopy full SHA for 949a55a
app/src/main/java/com/fmt/github/ext/BooleanExt.kt
@@ -6,7 +6,7 @@ sealed class BooleanExt<out T>//巧用协变与密封类(增强版枚举)
6
7
class Success<T>(val data: T) : BooleanExt<T>()
8
9
-object OtherWise : BooleanExt<Nothing>()
+object OtherWise : BooleanExt<Nothing>()//Nothing是任何类的子类
10
11
inline fun <T> Boolean.yes(block: () -> T): BooleanExt<T> =//inline提升性能
12
when {
0 commit comments