1a29b9efff
- Mangled names of property accessors now include context receiver types of the corresponding property when computed from FIR. - Context receivers are now supported when computing mangled names from IR - IrBasedDescriptors now account for context receivers ^KT-57435 Fixed
18 lines
338 B
Kotlin
Vendored
18 lines
338 B
Kotlin
Vendored
// !LANGUAGE: +ContextReceivers
|
|
// IGNORE_BACKEND: JS_IR
|
|
// WITH_STDLIB
|
|
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"
|
|
}
|
|
}
|