[PSI2IR, IR] Support functional types and literals for IR

This commit is contained in:
Anastasiya Shadrina
2021-09-16 17:45:26 +07:00
committed by TeamCityServer
parent 910660a083
commit 155e7b211b
6 changed files with 42 additions and 8 deletions
@@ -0,0 +1,18 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
class Param
class O {
val o = "o"
}
class K {
val k = "k"
}
context(O)
fun <T> K.f(g: context(O) K.(Param) -> T) = g(this@O, this@K, Param())
fun box() = with(O()) {
K().f { o + k }
}