Intentions: Fix insertion of necessary lambda parameter for run/let and apply/also conversions
#KT-22931 Fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Convert to 'also'
|
||||
class Employee(val firstName: String, val manager: Employee?)
|
||||
|
||||
fun test(employee: Employee) {
|
||||
val person = employee.also {
|
||||
it.manager?.<caret>apply {
|
||||
println("${it.firstName} has a manager")
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Convert to 'also'
|
||||
class Employee(val firstName: String, val manager: Employee?)
|
||||
|
||||
fun test(employee: Employee) {
|
||||
val person = employee.also {
|
||||
it.manager?.<caret>also { employee1 ->
|
||||
println("${it.firstName} has a manager")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user