UselessCallOnCollectionInspection: fix false positive when lambda last statement is function call that returns generic type
#KT-38267 Fixed
This commit is contained in:
committed by
igoriakovlev
parent
3c8ef5749f
commit
148f49d54a
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Change call to 'map'
|
||||
|
||||
fun test(): List<String> {
|
||||
return listOf(1, 2, 3).map { i ->
|
||||
foo {
|
||||
bar(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> foo(f: () -> T): T = f()
|
||||
|
||||
fun bar(i: Int): String = ""
|
||||
Reference in New Issue
Block a user