Kotlin简化布尔表达式

J A*_*dag -1 boolean-expression kotlin

为什么我"Simplify boolean expression"if条件行中会出现一个小错误?

例如这段代码:

if (isClear==true){
    displayText.setText("")
}
Run Code Online (Sandbox Code Playgroud)

Ale*_*sky 9

尝试以下简单的布尔表达式并避免错误:

if (isClear) {
    displayText.setText("")
}
Run Code Online (Sandbox Code Playgroud)

希望这有帮助!