1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-25 04:50:26 +08:00

Add WeakRef

This commit is contained in:
Him188 2019-12-18 12:54:18 +08:00
parent 3731bd9822
commit bf9dcbca18

View File

@ -18,7 +18,7 @@ inline class UnsafeWeakRef<T>(private val weakRef: WeakRef<T>) {
* val bot: Bot by param.unsafeWeakRef()
* ```
*/
operator fun getValue(thisRef: Any?, property: KProperty<*>): T? = this.get()
operator fun getValue(thisRef: Any?, property: KProperty<*>): T = this.get()
}
/**