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

Additional string.format() test for message field accesses #694

Merged

Conversation

TristonianJones
Copy link
Collaborator

@TristonianJones TristonianJones commented Apr 29, 2023

Refined the test approach in ext/strings_test.go to better cover type-based validation of format args.

Fixed an issue where attribute ids were referring to the variable id rather than the leaf value of the attribute.
This has a minor impact on attribute state tracking which should not affect semantic meaning, but which
does have a real impact on whether or not the attribute expression corresponds to the type identifier in
the checked.proto type_map field.

Closes #690

@TristonianJones TristonianJones changed the title Additional test for message field accesses Additional string.format() test for message field accesses Apr 29, 2023
…acking and correlation to type ids from checked expressions
@TristonianJones
Copy link
Collaborator Author

FYI @jpbetz

Copy link
Collaborator

@jpbetz jpbetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right to me.

I'm far from an expert on the attributes aspect, but it looks sane.

Thanks for finding and fixing!

@TristonianJones TristonianJones merged commit 1fcac88 into google:master May 2, 2023
2 checks passed
@TristonianJones TristonianJones deleted the fix-opt-format-checks branch May 2, 2023 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OptCheckStringFormat causes Program to fail generation if format argument has field access
2 participants