Convert lambda to reference intention: apply shorten references to callable reference only, not to the whole argument list
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun bar(s: String) = s.length
|
||||
|
||||
val x = listOf("Jack", "Tom").mapTo(kotlin.collections.hashSetOf<Int>()) <caret>{ w -> bar(w) }
|
||||
@@ -0,0 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun bar(s: String) = s.length
|
||||
|
||||
val x = listOf("Jack", "Tom").mapTo(kotlin.collections.hashSetOf<Int>(), ::bar)
|
||||
Reference in New Issue
Block a user