libchan icon indicating copy to clipboard operation
libchan copied to clipboard

Anonymous embedded structs aren't supported

Open stevvooe opened this issue 10 years ago • 2 comments

It seems when using anonymous embedded structs, field values are not transmitted. For example, given the following types:

type B struct {
    I int
}

type A struct {
    B
    J int
}

If A is sent on a channel, values for the anonymously embedded B struct are not sent.

stevvooe avatar Dec 03 '14 23:12 stevvooe

Is this still an issue? I went to add a unit test to track this down and it appears to work.

https://github.com/Shelnutt2/libchan/commit/6a229ba8bb3b444d4e6b7c28b5c95958dbd645b1

Shelnutt2 avatar Jan 18 '16 12:01 Shelnutt2

I do expect this to work as well with the latest encoding change. I would try to make this test work with the spdy package since that will hit the encoder. The in mem should not be a problem since it is only passing along a reference.

dmcgowan avatar Jan 19 '16 05:01 dmcgowan