-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
CDDL featureFeature that is required for proper parsing of CDDL filesFeature that is required for proper parsing of CDDL filesbugSomething isn't workingSomething isn't working
Description
For example in [a]
or [* a]
it seems only for generics we ignore the *
and always end up with a single element array. In the non-generic case this is handled properly (I'm not sure which PR fixed this because it used to be an issue for non-generics too with it always interpreting [a] as [* a]
, i.e. the opposite problem as now)
Consider the following:
single_field_struct = [uint]
uint_array = [*uint]
generic_single_field_struct<a> = [a]
generic_array<a> = [*a]
occurence_test = [
single_field_struct,
uint_array,
gen_single_field: generic_single_field_struct<uint>,
gen_array: generic_array<uint>,
]
the fields single_field_struct
and uint_array
correctly generate as a single-uint
struct and a Vec<uint>
respectively, but the last two fields both generate as a single uint
struct even though gen_array
should be handled as a Vec<uint>
here.
We should always respect the occurrence operators to decide what kind of array (expandable vs fixed single element) in all cases.
Metadata
Metadata
Assignees
Labels
CDDL featureFeature that is required for proper parsing of CDDL filesFeature that is required for proper parsing of CDDL filesbugSomething isn't workingSomething isn't working