Skip to content
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

[C#] SinceVersion checks use type's version, not the field #763

Closed
EddPorter opened this issue Mar 6, 2020 · 2 comments
Closed

[C#] SinceVersion checks use type's version, not the field #763

EddPorter opened this issue Mar 6, 2020 · 2 comments
Labels

Comments

@EddPorter
Copy link

When generating fields, the encodingToken is passed to the generate*Property() methods and the properties from the enclosing signalToken are ignored. In particular, using sinceVersion on a field has no effect. Any fields using primitive types will never output code from generateFieldNotPresentCondition(). Also, and misleadingly, fields using custom or composite types will output version checking code based on the sinceVersion specified in the type.

@mjpt777
Copy link
Contributor

mjpt777 commented Mar 9, 2020

The sinceVersion on the type should be considered but it is overridden by the value on the field. The value from the field will be set in the IR based on the type if none is set on the field. The C# codes should use the value from the field. The Java and C++ codecs use the value from the field. In the past this was confused as the standard moved around on this topic.

@mjpt777
Copy link
Contributor

mjpt777 commented Mar 9, 2020

@billsegall can you check if my change generates the correct code for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants