is it possible to apply multiple contexts in exten...
# random
r
is it possible to apply multiple contexts in extension function?
Copy code
interface Scope {
   fun SomeObject.foo(): Bar = Bar()
}

// interface Scope is not under my control and I need to add extension function on another object so it would behave the same way like it would be in interface

// like 
interface Scope {
   fun SomeObject.foo(): Bar = Bar()
   fun OtherObject.bar(): Foo = Foo()
}
e
no, use inheritance
m
Exactly. Allowing more than one receiver for extensions is under active discussion: https://github.com/Kotlin/KEEP/pull/176