找出嵌套 it 接收者里的 bug

来自 作用域函数
Kotlin 2.4.10 进阶 4分钟 找出 1处问题

函数应发送找到的客户名下的每个订单。请找出接收对象错误。

kotlin
data class Customer(val id: String)
data class Order(val customerId: String)

fun notify(customer: Customer?, orders: List<Order>) {
    customer?.let {
        orders.filter { it.customerId == it.id }
            .forEach { order -> send(order) }
    }
}
在试验场中打开
报告错误