Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71a37a2906 | ||
|
|
ab05f83e77 | ||
|
|
a2d26fc777 | ||
|
|
dd1a1544c6 |
@@ -82,14 +82,11 @@ open class LynonDecoder(val bin: BitInput, val settings: LynonSettings = LynonSe
|
|||||||
if (it !is ObjClass)
|
if (it !is ObjClass)
|
||||||
scope.raiseClassCastError("Expected obj class but got ${it::class.simpleName}")
|
scope.raiseClassCastError("Expected obj class but got ${it::class.simpleName}")
|
||||||
it
|
it
|
||||||
} ?: run {
|
} ?: scope.also {
|
||||||
val fallback = runCatching { scope.eval(className.value) }.getOrNull()
|
println("Class not found: $className")
|
||||||
if (fallback != null) {
|
println("::: ${runCatching { scope.eval("Vault")}.getOrNull() }")
|
||||||
println("Fallback to eval successful")
|
println("::2 [${className}]: ${scope.get(className.value)}")
|
||||||
fallback as ObjClass
|
}.raiseSymbolNotFound("can't deserialize: not found type $className")
|
||||||
}
|
|
||||||
else scope.raiseSymbolNotFound("can't deserialize: not found type $className")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun decodeAnyList(scope: Scope, fixedSize: Int? = null): MutableList<Obj> {
|
suspend fun decodeAnyList(scope: Scope, fixedSize: Int? = null): MutableList<Obj> {
|
||||||
|
|||||||
Reference in new issue
Block a user