-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove invalid enum reference from storm32.xml #1947
Conversation
omg, indeed ... MANY thx! could you please also change the date to 3. Feb. 2023 (it seems one can't do a suggestion for non modified lines) |
Co-authored-by: olliw42 <6089567+olliw42@users.noreply.github.com>
@olliw42 all done. |
perfect, many thx sir :) it's interesting that some generators do test for such things... |
@olliw42 in some strongly typed languages, an enum corresponds to a dedicated type. If the enum doesn't exist, the field has an invalid type. While in C, that is still a strongly typed language, an enum-based field may be converted into #define ENUM_MYENUM_VAL1 1
#define ENUM_MYENUM_VAL2 2
typedef struct {
uint16_t my_field;
} mymsg; In Typescript, it is converted into enum myenum {
myval1 = 1,
myval2 = 2,
}
type mymsg = {
my_field: myenum
}; In Golang, it is converted into type myenum int
const (
myval1 myenum = 1
myval2 myenum = 2
)
type mymsg struct {
my_field myenum
} Therefore myenum must exist. |
ah, it's not a generator thing but a language thing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olliw42 I'm taking your comment as approval and merging :-)
#1941 contains an invalid enum reference that breaks generation of external libraries.
I searched for the enum definition but i couldn't find it, therefore it should be removed unless @olliw42 provides it.