blob: 5b6da33806c9fd61d1c975d9f868b1c7ed7b83a1 [file]
// LANGUAGE: +ContextParameters +ExplicitContextArguments
// IGNORE_BACKEND_K1: ANY
// ISSUE: KT-52002
class Scope(val name: String)
interface Interface {
fun foo(): String
context(scope: Scope)
fun foo(): String
}
class ClassBoth : Interface {
override fun foo() = "O"
context(scope: Scope)
override fun foo() = "K"
}
fun box(): String {
val scope = Scope("")
val c = ClassBoth()
val result = c.foo() + c.foo(scope = scope)
return result
}