6.6.1 - Alpha2 - 修复 "非原始类型值" 异常

This commit is contained in:
SuperMonster003
2024-12-04 17:14:43 +08:00
parent 2f799b4b21
commit 4904b30d34
4 changed files with 11 additions and 5 deletions

View File

@@ -864,7 +864,10 @@ object RhinoUtils {
override fun toString(): String = "function ${funcName ?: ""}() { ... }"
override fun getDefaultValue(typeHint: Class<*>?) = this
override fun getDefaultValue(typeHint: Class<*>?) = when (typeHint) {
org.mozilla.javascript.ScriptRuntime.StringClass -> toString()
else -> this
}
}