fix: added header generation support for ref_to arrays#1652
fix: added header generation support for ref_to arrays#1652Angus-Bethke-Bachmann merged 3 commits intomasterfrom
Conversation
| if data_type_is_system_generated(referenced_type_name) { | ||
| self.get_user_type_variable( | ||
| get_user_generated_type_by_name(referenced_type_name, user_types) | ||
| .expect("This system generated type must be here!"), |
There was a problem hiding this comment.
I'm a little confused by this expect message. We call methods/functions referencing user types, but if we can't find it we crash with a message saying the system generated type must exist.
Another note: get_user_type_variable returns Option<Variable> - can we propagate any potential None we encounter in the function-body to the caller and handle it there instead of crashing? Since this is just for the header-generation, I don't see it as blocking - just wondering.
There was a problem hiding this comment.
Quite right, that expect should not have been there. I have refactored that call to correctly invoke the recursive call only in the condition I need it to. The "None" is propagated back upstream now as well, and I am logging a warning if "None" was returned.
Changed
Testing