go-qemu icon indicating copy to clipboard operation
go-qemu copied to clipboard

Fix `simpleunion` marshall

Open wildarch opened this issue 3 years ago • 0 comments

The version in master does not unwrap the inner type in type definitions when marshalling to JSON. This results in infinite recursion that eventually exhausts the stack.

This PR fixes the template to perform this unwrapping, so that marshalling these types works. I have also added simple regression test to make sure one of the simpleunion can indeed be marshalled.

wildarch avatar Jul 29 '21 20:07 wildarch