David Kubecka
11/08/2024, 4:03 PMfun test(x: Int)
context(Int)
fun test()
Would it make sense then to allow overriding a method via a context receiver? E.g.
interface Test {
fun test(x: Int, y: String)
}
object : Test {
context(Int)
override fun test(y: String)
}
This would come handed when dealing with generated interfaces, so that some of the parameters in the implementation can be designated as contexts.Alejandro Serrano.Mena
11/08/2024, 7:45 PMtest
with a Int.test(y: String)