For each parameter not used: handle char sequences correctly
An enhancement for KT-27209
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with 'repeat(size)'
|
||||
// FIX: Replace with 'repeat()'
|
||||
|
||||
fun test(list: List<String>) {
|
||||
list.for<caret>Each {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with 'repeat(size)'
|
||||
// FIX: Replace with 'repeat()'
|
||||
|
||||
fun test(list: List<String>) {
|
||||
repeat(list.size) {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with 'repeat(size)'
|
||||
// FIX: Replace with 'repeat()'
|
||||
|
||||
fun test(sequence: Sequence<String>) {
|
||||
sequence.for<caret>Each {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with 'repeat(size)'
|
||||
// FIX: Replace with 'repeat()'
|
||||
|
||||
fun test(sequence: Sequence<String>) {
|
||||
repeat(sequence.count()) {}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with 'repeat()'
|
||||
|
||||
fun test(s: String) {
|
||||
s.for<caret>Each {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace with 'repeat()'
|
||||
|
||||
fun test(s: String) {
|
||||
repeat(s.length) {}
|
||||
}
|
||||
Reference in New Issue
Block a user