使用“移除不必要的圆括号”快速修复可清理代码。
示例:
annotation class MyAnnotationA
annotation class MyAnnotationB(val x: Int)
annotation class MyAnnotationC(val x: Int = 10) // 存在默认值
@MyAnnotationA() // <== 圆括号冗余
fun testA() {
}
@MyAnnotationB() // <== 缺少实参,圆括号为必选项
fun testB() {
}
@MyAnnotationC() // <== 圆括号冗余
fun testC() {
}