assert 호출을 보고합니다.
Using !! or ?: makes your code simpler.
The quick-fix replaces assert with !! or ?: operator in the variable initializer.
예:
fun foo(p: Array<String?>) {
val v = p[0]
assert(v != null, { "Should be not null" })
}
빠른 수정을 적용한 후:
fun foo(p: Array<String?>) {
val v = p[0] ?: error("Should be not null")
}