implemented object expressions (anonymous classes)

This commit is contained in:
sergeych committed 2026-01-06 01:25:01 +01:00
1 parent 8611543623
commit eec732d11a
7 files changed
+225 -19

No files matched your search

@@ -101,6 +101,7 @@ open class LynonEncoder(val bout: BitOutput, val settings: LynonSettings = Lynon
* Caching is used automatically.
*/
suspend fun encodeAny(scope: Scope, obj: Obj) {
if (obj.objClass.isAnonymous) scope.raiseError("Cannot serialize anonymous object")
encodeCached(obj) {
val type = putTypeRecord(scope, obj, obj.lynonType())
obj.serialize(scope, this, type)