From bf9dcbca18f3c7bd79fc18d75b2f1cafd2d2101a Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 18 Dec 2019 12:54:18 +0800 Subject: [PATCH] Add WeakRef --- .../src/commonMain/kotlin/net.mamoe.mirai/utils/WeakRef.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/WeakRef.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/WeakRef.kt index 144ca4a07..55dc76b4b 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/WeakRef.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/WeakRef.kt @@ -18,7 +18,7 @@ inline class UnsafeWeakRef(private val weakRef: WeakRef) { * 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() } /**