66 lines
1.3 KiB
Plaintext
Vendored
66 lines
1.3 KiB
Plaintext
Vendored
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 <index_0>: Int = 0
|
|
val <unary>: Int = <array>.get(index = <index_0>)
|
|
<array>.set(index = <index_0>, value = <unary>.inc())
|
|
<unary>
|
|
}
|
|
}
|
|
} /*~> Unit */
|
|
}
|