[Tests] Add irText tests
This commit is contained in:
committed by
TeamCityServer
parent
a3cf1a11bf
commit
3f50b675b1
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
class View {
|
||||
val coefficient = 42
|
||||
}
|
||||
|
||||
context(View) val Int.dp get() = coefficient * this
|
||||
|
||||
fun box(): String {
|
||||
with(View()) {
|
||||
if (listOf(1, 2, 10).map { it.dp } == listOf(42, 84, 420)) {
|
||||
return "OK"
|
||||
}
|
||||
return "fail"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user