Eliminate redundancy of context receiver when overriding a function

Hi all,

What do you think of eliminating the redundancy of context(Scope) when overriding a function that already have it?

Screenshot 2023-03-07 at 21.44.12

In this snippet, wouldn’t it make more sense if we were able to just override performAction without explicitly adding context(Scope)?

What if there are two overloads of this function?

fun performAction()

context(Scope)
fun performAction()

Function with and without a context receiver are two distinct functions. This is similar to a function with and without parameters. As a matter of fact, receivers are parameters, only implicit.

1 Like