cddl-codegen
cddl-codegen copied to clipboard
@name with explicit basic group in group choice generates non-compiling code
basic = (text, uint)
choice = [
; @name foo
basic //
; @name bar
uint, basic
]
will generate Self::Foo(Foo::new(...)) instead of Self::Foo(Basic::new(...)) which won't compile as there is no struct Foo, only the enum variant.
The second case Bar works as intended as would Foo if it were defined inline or if @name was not used.