Marc-André Lureau <marcandre.lur...@gmail.com> writes: > On Mon, Oct 2, 2017 at 5:25 PM, Markus Armbruster <arm...@redhat.com> wrote: >> This demonstrates a bug in the lowering of simple unions: if more than >> one schema uses the same built-in type T for a simple union member, >> they all generate the same q_obj_T_wrapper into their qapi-types.h. >> They clash when you include more than one schema's qapi-types.h. > > Ah, I don't remember seeing that when I splitted the schema in my > qapi-if / conditional series.
Simple union members of built-in type are rare. I spotted the problem with options, then realized it's already possible with simple unions. > Could it happen with non-built-in types ? Yes, but multiple q_obj_T_wrapper can clash only when their T also clash. Name your types more wisely then. >> Signed-off-by: Markus Armbruster <arm...@redhat.com> > > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Thanks!