Add Union on top level union messages

Closes https://github.com/capnproto/pycapnp/issues/247
This commit is contained in:
John Vandenberg
2021-05-31 16:14:21 +08:00
parent 581332f9c9
commit 0c904443bd
3 changed files with 46 additions and 0 deletions

View File

@@ -50,3 +50,21 @@ struct TestAllTypes {
enumList @32 : List(TestEnum);
interfaceList @33 : List(Void); # TODO
}
struct UnionAllTypes {
union {
unionStructField1 @0 : TestAllTypes;
unionStructField2 @1 : TestAllTypes;
}
}
struct GroupedUnionAllTypes {
union {
g1 :group {
unionStructField1 @0 : TestAllTypes;
}
g2 :group {
unionStructField2 @1 : TestAllTypes;
}
}
}