Compare commits

..

No commits in common. "180471e4cdbd530658d8af703e6c7659de0b3ddb" and "71a37a29061397470037198bf30f5ad0cd008d19" have entirely different histories.

View File

@ -82,14 +82,11 @@ open class LynonDecoder(val bin: BitInput, val settings: LynonSettings = LynonSe
if (it !is ObjClass)
scope.raiseClassCastError("Expected obj class but got ${it::class.simpleName}")
it
} ?: run {
val fallback = runCatching { scope.eval(className.value) }.getOrNull()
if (fallback != null) {
println("Fallback to eval successful")
fallback as ObjClass
}
else scope.raiseSymbolNotFound("can't deserialize: not found type $className")
}
} ?: scope.also {
println("Class not found: $className")
println("::: ${runCatching { scope.eval("Vault")}.getOrNull() }")
println("::2 [${className}]: ${scope.get(className.value)}")
}.raiseSymbolNotFound("can't deserialize: not found type $className")
}
suspend fun decodeAnyList(scope: Scope, fixedSize: Int? = null): MutableList<Obj> {