FIR: implementation of delegateProvider in delegate resolve
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class Delegate(val value: String) {
|
||||
operator fun getValue(thisRef: Any?, property: Any?) = value
|
||||
}
|
||||
|
||||
class DelegateProvider(val value: String) {
|
||||
operator fun provideDelegate(thisRef: Any?, property: Any?) = Delegate(value)
|
||||
}
|
||||
|
||||
val testTopLevel by DelegateProvider("OK")
|
||||
@@ -0,0 +1,31 @@
|
||||
FILE: simpleDelegateProvider.kt
|
||||
public final class Delegate : R|kotlin/Any| {
|
||||
public constructor(value: R|kotlin/String|): R|Delegate| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val value: R|kotlin/String| = R|<local>/value|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public final operator fun getValue(thisRef: R|kotlin/Any|?, property: R|kotlin/Any|?): R|kotlin/String| {
|
||||
^getValue R|/Delegate.value|
|
||||
}
|
||||
|
||||
}
|
||||
public final class DelegateProvider : R|kotlin/Any| {
|
||||
public constructor(value: R|kotlin/String|): R|DelegateProvider| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val value: R|kotlin/String| = R|<local>/value|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public final operator fun provideDelegate(thisRef: R|kotlin/Any|?, property: R|kotlin/Any|?): R|Delegate| {
|
||||
^provideDelegate R|/Delegate.Delegate|(R|/DelegateProvider.value|)
|
||||
}
|
||||
|
||||
}
|
||||
public final val testTopLevel: R|kotlin/String|by R|/DelegateProvider.DelegateProvider|(String(OK)).R|/DelegateProvider.provideDelegate|(Null(null), ::R|/testTopLevel|)
|
||||
public get(): R|kotlin/String| {
|
||||
^ D|/testTopLevel|.R|/Delegate.getValue|(Null(null), ::R|/testTopLevel|)
|
||||
}
|
||||
Reference in New Issue
Block a user