Refactor toString implementations to support Scope context, add inspect, and improve assertions readability.

This commit is contained in:
sergeych committed 2025-12-13 13:48:57 +01:00
1 parent 2737aaa14e
commit fba44622e5
8 files changed
+95 -27

No files matched your search

@@ -82,7 +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
} ?: 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> {