-
Notifications
You must be signed in to change notification settings - Fork 277
[TG-6381] Set opaque fields as final #4439
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
Conversation
{ | ||
const symbolt &opaque_field_symbol = | ||
symbol_table.lookup_ref(opaque_class_prefix + ".field1"); | ||
REQUIRE(opaque_field_symbol.type.get_bool(ID_C_constant)); |
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.
⛏️ @thomasspriggs was going to look at a nice way of accessing properties of static fields (since them being comments on the type is a bit unstable) perhaps in a follow up PR you can do whatever he ends up doing.
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.
Good point, Tom passed me his PRs so I will follow up on that.
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.
OK considering we don't use stub-side-effects widely, will limit the solution space when we do though.
3a5a22b
to
b4b9f24
Compare
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: b4b9f24).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/106750508
I added the |
Both static and non-static opaque (stub) fields should be considered final to avoid assuming they can be overridden
b4b9f24
to
1c4444a
Compare
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 1c4444a).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/106770545
Test-gen bump passed CI, merging. |
Previously, we implicitly assumed that stub/opaque fields are not final and thus they can be assigned directly which causes problems if the field is actually final. Since we don;t know any better, we must assume all opaque fields are final.