KT-52027 Encapsulate and fix calculation of parameter indices

This commit is contained in:
Pavel Mikhailovskii
2022-12-06 23:16:11 +00:00
committed by Space Team
parent a297240870
commit 2d69fd5a8a
9 changed files with 49 additions and 26 deletions
@@ -0,0 +1,20 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
class A
class Example {
context(A)
inline fun fn(x: Int) {}
}
fun test() {
with(A()) {
Example().fn(1)
}
}
fun box(): String {
test()
return "OK"
}