Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/dp.kt.txt
T
Anastasiya Shadrina 3f50b675b1 [Tests] Add irText tests
2021-12-02 20:24:25 +03:00

33 lines
663 B
Plaintext
Vendored

class View {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val coefficient: Int
field = 42
get
}
val Int.dp: Int
get(<this>: View): Int {
return <this>.<get-coefficient>().times(other = <this>)
}
fun box(): String {
with<View, Nothing>(receiver = View(), block = local fun View.<anonymous>(): Nothing {
when {
EQEQ(arg0 = listOf<Int>(elements = [1, 2, 10]).map<Int, Int>(transform = local fun <anonymous>(it: Int): Int {
return it.<get-dp>(<this> = $this$with)
}
), arg1 = listOf<Int>(elements = [42, 84, 420])) -> { // BLOCK
return "OK"
}
}
return "fail"
}
)
}