Fix false positive "Collection count can be converted to size" with Iterable

#KT-34677 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-11-10 16:00:25 +09:00
committed by Vladimir Dolzhenko
parent d906c814cf
commit e2a7170b2f
7 changed files with 64 additions and 18 deletions
@@ -0,0 +1,6 @@
// PROBLEM: none
// WITH_RUNTIME
fun foo(iterable: Iterable<String>) {
iterable.<caret>count()
}
@@ -0,0 +1,6 @@
// PROBLEM: none
// WITH_RUNTIME
fun foo(iterable: Iterable<String>?) {
iterable?.<caret>count()
}
@@ -0,0 +1,8 @@
// PROBLEM: none
// WITH_RUNTIME
fun foo(iterable: Iterable<String>) {
iterable.run {
<caret>count()
}
}