[PSI2IR] Generate IR for functions and calls with context receivers

This commit is contained in:
Anastasiya Shadrina
2021-02-17 04:53:15 +07:00
committed by TeamCityServer
parent f4ddf66ac4
commit 307f318c9e
29 changed files with 378 additions and 98 deletions
@@ -0,0 +1,21 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
class A {
val o = "O"
}
class B {
val k = "K"
}
context(B) fun A.f(a: Any, b: Any) = o + k
fun B.g(a: A): String {
with (a) {
return f(1, "2")
}
}
fun box(): String {
return B().g(A())
}