Skip to content

Use defined alias types are not checked for compatibility with existing types in a union #25

@v-kylegre

Description

@v-kylegre

When defining a union type field within a record there is validation which ensures all type cases in a union are distinct. User defined aliases are not checked. This leads to issues compiling generated code due to variants containing multiples of the same underlying type. There also appears to be a similar conflict with 'size' and 'uint64'.

MyIntType: uint64 
MyRecord: !record
  fields:
    one: [uint64, MyIntType]
MyRecord: !record
  fields:
    one: [uint64, size]

Records defined as such succeed in code generation, but that code cannot be compiled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions