Unmute some FIR2IR tests

This commit is contained in:
Mikhail Glukhikh
2022-02-02 17:59:40 +03:00
committed by TeamCityServer
parent 87d813d780
commit bd31cbaebf
6 changed files with 520 additions and 3 deletions
@@ -0,0 +1,65 @@
package test
class C {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
var C?.p: Int
get(): Int {
return 42
}
set(value: Int) {
}
operator fun Int?.inc(): Int? {
return { // BLOCK
val tmp0_safe_receiver: Int? = <this>
when {
EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null
else -> tmp0_safe_receiver.inc()
}
}
}
operator fun Int?.get(index: Int): Int {
return 42
}
operator fun Int?.set(index: Int, value: Int) {
}
fun testProperty(nc: C?) {
{ // BLOCK
val tmp1_safe_receiver: C? = nc
when {
EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null
else -> { // BLOCK
val <receiver>: C = tmp1_safe_receiver
val <unary>: Int = <receiver>.<get-p>()
<receiver>.<set-p>(value = <unary>.inc())
<unary>
}
}
} /*~> Unit */
}
fun testArrayAccess(nc: C?) {
{ // BLOCK
val tmp2_safe_receiver: C? = nc
when {
EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null
else -> { // BLOCK
val <array>: Int = tmp2_safe_receiver.<get-p>()
val <index0>: Int = 0
val <unary>: Int = <array>.get(index = <index0>)
<array>.set(index = <index0>, value = <unary>.inc())
<unary>
}
}
} /*~> Unit */
}