The KEEP for Context Parameters <github.com/Kotlin...
# getting-started
a
The KEEP for Context Parameters github.com/Kotlin/KEEP/blob/…/KEEP-0367-context-parameters.md says §1.5 (override and overloading) … It is a conflict to declare overloads which only differ in the number of context parameters. It is allowed to declare one overload with no context parameters and one with some of them (this is aligned with §7.8). (emphasis mine) Yet, when I attempt this
Copy code
fun Bar.frob() { } // No context parameter
 
context(foo:Foo) // Some of them ...
fun Bar.frob() { … }
IDE shows error The following overloads conflict with this contextual declaration. Calls will be ambiguous because context arguments are not used for overload resolution. Overload resolution ambiguity between candidates … Did I misread this? How should the underlined blurb above be interpreted?
y
It was changed in explicit context arguments, specifically this comment mentions it
👍 1