Convert lambda to reference: handle named arguments more precisely
For trailing lambda intention inserts parameter names for all arguments if at least one argument used default value. Otherwise it just keeps existing named arguments. So #KT-20349 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
4c4427c280
commit
fa03632197
@@ -0,0 +1,7 @@
|
||||
class Transformer {
|
||||
fun transform(x: Int = 0, y: Int = 1, f: (Int) -> Int) = f(x + y)
|
||||
}
|
||||
|
||||
fun bar(x: Int) = x * x
|
||||
|
||||
val y = Transformer().transform { <caret>bar(it) }
|
||||
Reference in New Issue
Block a user