"Call on collection type may be reduced": fix false positive with mapNotNull, generic lambda block and new inference

#KT-32801 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-01-26 23:15:48 +09:00
committed by Yan Zhulanow
parent 6ee4b5e393
commit 4638a97bbc
3 changed files with 20 additions and 1 deletions
@@ -0,0 +1,11 @@
// PROBLEM: none
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference
// WITH_RUNTIME
fun <R> mylet(block: () -> R): R = block()
val x = listOf(1, 2, 3).<caret>mapNotNull {
mylet {
null
}
}