quickfix icon indicating copy to clipboard operation
quickfix copied to clipboard

Component should never be a pointer

Open rubensayshi opened this issue 4 years ago • 0 comments

changed all usage of Component to always be on Component, never *Component, this way the type switches actually work everywhere and consistently.
Because both *Component and Component implement MessagePart it was being mixed up.

This fixes a bug in the generated code not considering required fields from required components to be required and thus they weren't added to the New() constructor for a message.

I think this could be considered a BC break ..., not sure how you guys deal with that?
If someone had a component with required fields which was marked as required then if they'd run generate-fix again the fields will be added to the arguments of New()...

rubensayshi avatar May 26 '21 12:05 rubensayshi