mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 06:50:08 +08:00
Add WeakRef
This commit is contained in:
parent
3731bd9822
commit
bf9dcbca18
@ -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()
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user