66 lines
1.7 KiB
Plaintext
Vendored
66 lines
1.7 KiB
Plaintext
Vendored
var operationScore: Int
|
|
field = 0
|
|
get
|
|
set
|
|
|
|
class Delegate {
|
|
constructor() /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
var delegateValue: String
|
|
field = "fail"
|
|
get
|
|
set
|
|
|
|
operator fun getValue(_context_receiver_0: Int, thisRef: Any?, property: KProperty<*>): String {
|
|
{ // BLOCK
|
|
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
|
}
|
|
return <this>.<get-delegateValue>()
|
|
}
|
|
|
|
operator fun setValue(_context_receiver_0: Int, thisRef: Any?, property: KProperty<*>, value: String) {
|
|
{ // BLOCK
|
|
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
|
|
}
|
|
<this>.<set-delegateValue>(<set-?> = value)
|
|
}
|
|
|
|
}
|
|
|
|
class Result {
|
|
private /* final field */ val contextReceiverField0: Int
|
|
constructor(_context_receiver_0: Int) /* primary */ {
|
|
super/*Any*/()
|
|
<this>.#contextReceiverField0 = _context_receiver_0
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
var s: String /* by */
|
|
field = Delegate()
|
|
get(): String {
|
|
return <this>.#s$delegate.getValue(_context_receiver_0 = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s)
|
|
}
|
|
set(<set-?>: String) {
|
|
return <this>.#s$delegate.setValue(_context_receiver_0 = <this>.#contextReceiverField0, thisRef = <this>, property = Result::s, value = <set-?>)
|
|
}
|
|
|
|
}
|
|
|
|
fun box(): String {
|
|
val result: Result = with<Int, Result>(receiver = 1, block = local fun Int.<anonymous>(): Result {
|
|
return Result(_context_receiver_0 = $this$with)
|
|
}
|
|
)
|
|
result.<set-s>(<set-?> = "OK")
|
|
val returnValue: String = result.<get-s>()
|
|
return when {
|
|
EQEQ(arg0 = <get-operationScore>(), arg1 = 2) -> returnValue
|
|
else -> "fail"
|
|
}
|
|
}
|