huntlabs / hunt

A refined core library for D programming language. The module has concurrency / collections / event / io / logging / text / serialization and more.
Apache License 2.0
95 stars 15 forks source link

Serialization of nested classes #63

Closed logicfish closed 4 years ago

logicfish commented 5 years ago
unittest {
    class myClass {
        class myInner {

        }
        myInner[] innerArray;
    }
    myClass c = new myClass;
    auto s = serialize(c);
}

\AppData\Local\dub\packages\hunt-1.3.0\hunt\source\hunt\util\Serialize.d(666,9): Error: outer function context ofapp.unittest_L24_C1is needed tonewnested classapp.unittest_L24_C1.myClass``

Heromyth commented 5 years ago

A new binary serialization module named BinarySerializer is on the todo list.

Heromyth commented 4 years ago

It's fixed in commit 032fe2c.