Kotlin 2.x

I am not fund of the new usage of context keyword in K2.x at all.

With some attention, the same result could have been achieved with only two cleaner keywords.

interface AutoClosing {
    local fun File.open()

interface ContextualAutoClosing {
    local override fun File.open()

Maybe I am wrong again!

I guess context would be better in this case! If there’s a way to fine-tune these functions by receiver and argument types later on.

Great job!!

You can join the discussion at Context parameters · Issue #367 · Kotlin/KEEP · GitHub