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
+13
@@ -0,0 +1,13 @@
|
||||
// PROBLEM: none
|
||||
// WITH_RUNTIME
|
||||
fun test(): List<String> {
|
||||
return listOf(1, 2, 3).<caret>mapNotNull { i ->
|
||||
foo {
|
||||
bar(i)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> foo(f: () -> T): T = f()
|
||||
|
||||
fun bar(i: Int): String? = null
|
||||
Reference in New Issue
Block a user