使用可以为null的Boolean

val b: Boolean? = ...
if (b == true) {
    ...
} else {
    // `b`为false或null
}

results matching ""

    No results matching ""