Feature request: Scoped functions combine context

It’s possible to combine different context objects by nesting with scope functions but it can become boilerplate after a while.

Is it possible to extend so you can do in a one line? (ex: with(obj1, obj2) {})

Likewise to scoped functions. (ex: fun (class1, class2).fuBar())

1 Like

This will be possible with context receivers, which IIRC will come out as a prototype under a flag in Kotlin 1.6.20


Thanks for the reply and the links.

1 Like