Boolean literal arguments: check previous arg, fix all args in a row
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
|
||||
// FIX: Add names to boolean arguments
|
||||
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
|
||||
|
||||
fun test() {
|
||||
foo(true, true, true<caret>)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
|
||||
// FIX: Add names to boolean arguments
|
||||
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
|
||||
|
||||
fun test() {
|
||||
foo(a = true, b = true, c = true)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
|
||||
// FIX: Add names to boolean arguments
|
||||
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
|
||||
|
||||
fun test() {
|
||||
foo(true, <caret>true, c = true)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
|
||||
// FIX: Add names to boolean arguments
|
||||
fun foo(a: Boolean, b: Boolean, c: Boolean) {}
|
||||
|
||||
fun test() {
|
||||
foo(a = true, b = true, c = true)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
// FIX: Add 'c =' to argument
|
||||
fun foo(a: Boolean, b: Int, c: Boolean) {}
|
||||
|
||||
fun test() {
|
||||
foo(true, 0, true<caret>)
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// HIGHLIGHT: INFORMATION
|
||||
// FIX: Add 'c =' to argument
|
||||
fun foo(a: Boolean, b: Int, c: Boolean) {}
|
||||
|
||||
fun test() {
|
||||
foo(true, 0, c = true)
|
||||
}
|
||||
Reference in New Issue
Block a user