"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:
committed by
Yan Zhulanow
parent
6ee4b5e393
commit
4638a97bbc
Vendored
+11
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user