From 65a65ffb0342c7d62728a978b419e52c2f3389ae Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 8 Nov 2020 09:38:19 +0800 Subject: [PATCH] Fix cast in findBackingFieldValue --- backend/mirai-console/src/data/AbstractPluginData.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/mirai-console/src/data/AbstractPluginData.kt b/backend/mirai-console/src/data/AbstractPluginData.kt index 6bbc507a4..a6f3ed4d1 100644 --- a/backend/mirai-console/src/data/AbstractPluginData.kt +++ b/backend/mirai-console/src/data/AbstractPluginData.kt @@ -161,7 +161,7 @@ public fun AbstractPluginData.findBackingFieldValue(property: KProperty): @ConsoleExperimentalApi public fun AbstractPluginData.findBackingFieldValue(propertyValueName: String): Value? { @Suppress("UNCHECKED_CAST") - return this.valueNodes.find { it.valueName == propertyValueName }?.value as Value + return this.valueNodes.find { it.valueName == propertyValueName }?.value as Value? } /**