[英]Assignments are not expressions and only expressions are allowed in this context - Kotlin
[英]If statement: Assignments are not expressions, and only expressions are allowed in this context kotlin
我的 if 語句中不斷收到錯誤消息:
fun someFunction(){
if (requestCode == 0 && resultCode = Activity.RESULT_OK && data != null) {
// Do stuff
}
}
應該是resultCode == Activity.RESULT_OK
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.