diff --git a/packages/omgidl-serialization/src/MessageReader.ts b/packages/omgidl-serialization/src/MessageReader.ts index e979ef3..aba4f25 100644 --- a/packages/omgidl-serialization/src/MessageReader.ts +++ b/packages/omgidl-serialization/src/MessageReader.ts @@ -67,6 +67,9 @@ export class MessageReader { usesMemberHeader: boolean; }, ): Record { + if (complexDef.aggregatedKind === "union") { + throw new Error(`Unions are not supported yet`); + } const msg: Record = {}; const { usesDelimiterHeader, usesMemberHeader, isTopLevel } = options;