Fix cast in findBackingFieldValue

This commit is contained in:
Him188 2020-11-08 09:38:19 +08:00
parent 4f3c9bd8d9
commit 65a65ffb03

View File

@ -161,7 +161,7 @@ public fun <T> AbstractPluginData.findBackingFieldValue(property: KProperty<T>):
@ConsoleExperimentalApi @ConsoleExperimentalApi
public fun <T> AbstractPluginData.findBackingFieldValue(propertyValueName: String): Value<out T>? { public fun <T> AbstractPluginData.findBackingFieldValue(propertyValueName: String): Value<out T>? {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
return this.valueNodes.find { it.valueName == propertyValueName }?.value as Value<out T> return this.valueNodes.find { it.valueName == propertyValueName }?.value as Value<out T>?
} }
/** /**