Cannot serialize 'Object' field
-------------------------------
Key: MSGPACK-80
URL:
http://jira.msgpack.org/browse/MSGPACK-80
Project: MessagePack
Issue Type: Bug
Components: D
Environment: DMD 2.060
Reporter: Andrej Mitrovic
Assignee: FURUHASHI Sadayuki
{code}
import msgpack;
class Foo { int x; }
class Main
{
Object _obj;
}
void main()
{
auto main = new Main;
main._obj = new Foo;
ubyte[] data = msgpack.pack(main);
}
{code}
Errors:
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\traits.d(2480): Error: tuple index 0 exceeds 0
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\traits.d(2481): Error: tuple index 0 exceeds 0
msgpack.d(4497): Error: template instance std.traits.BaseClassesTuple!(Object) error instantiating
msgpack.d(779): instantiated from here: SerializingClasses!(Object)
msgpack.d(792): instantiated from here: pack!(Object)
msgpack.d(4055): instantiated from here: pack!(Main)
test.d(18): instantiated from here: pack!(false,Main)
msgpack.d(779): Error: template instance msgpack.SerializingClasses!(Object) error instantiating
msgpack.d(792): instantiated from here: pack!(Object)
msgpack.d(4055): instantiated from here: pack!(Main)
test.d(18): instantiated from here: pack!(false,Main)
msgpack.d(783): Error: function msgpack.Packer!(Appender!(ubyte[])).Packer.beginMap (const(uint) length) is not callable using argument types (immutable(_error_))
msgpack.d(783): Error: function msgpack.Packer!(Appender!(ubyte[])).Packer.beginMap (const(uint) length) is not callable using argument types (immutable(_error_))
msgpack.d(785): Error: function msgpack.Packer!(Appender!(ubyte[])).Packer.beginArray (const(uint) length) is not callable using argument types (immutable(_error_))
msgpack.d(785): Error: function msgpack.Packer!(Appender!(ubyte[])).Packer.beginArray (const(uint) length) is not callable using argument types (immutable(_error_))
msgpack.d(788): Error: Class is used as a type
msgpack.d(788): Error: Class is used as a type
msgpack.d(792): Error: template instance msgpack.Packer!(Appender!(ubyte[])).Packer.pack!(Object) error instantiating
msgpack.d(4055): instantiated from here: pack!(Main)
test.d(18): instantiated from here: pack!(false,Main)
msgpack.d(4055): Error: template instance msgpack.Packer!(Appender!(ubyte[])).Packer.pack!(Main) error instantiating
test.d(18): instantiated from here: pack!(false,Main)
test.d(18): Error: template instance msgpack.pack!(false,Main) error instantiating
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira