[FE, IR] Support deserialization

This commit is contained in:
Anastasiya Shadrina
2021-10-29 05:53:47 +07:00
committed by TeamCityServer
parent 2fbfee3e11
commit 617af898b0
8 changed files with 118 additions and 6 deletions
@@ -0,0 +1,31 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// MODULE: lib
// FILE: A.kt
package a
context(Int)
fun one(dummy: Any?) = this@Int
context(Int)
val two get() = this@Int
class Foo {
context(Int)
val three get() = this@Int
context(Int)
fun four(dummy: Any?) = this@Int
}
// MODULE: main(lib)
// FILE: B.kt
fun box(): String {
return with(1) {
if (a.one(null) + a.two + a.Foo().three + a.Foo().four(null) == 4) "OK" else "fail"
}
}