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

Allow struct to contain member with same name #133

Conversation

snosenzo
Copy link
Collaborator

According to IDL spec, structs members consist of declarators rather than scoped names. So it's okay for them to have the same name because the struct member identifiers do not exist outside of the struct scope.

This also mirrors C behavior: https://stackoverflow.com/questions/15397502/in-c-can-struct-members-use-the-same-name-as-a-type

Fixes: FG-6541 and #132

@snosenzo snosenzo requested review from jtbandes and achim-k February 12, 2024 19:33
@@ -1,7 +1,7 @@
// -*- jsonc -*-
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
Copy link
Contributor

Choose a reason for hiding this comment

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

accidentally committed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's from a vscode update that hasn't gone through yet for this repo. studio has this as well.

@snosenzo snosenzo merged commit 586ee40 into main Feb 13, 2024
2 checks passed
@snosenzo snosenzo deleted the sam/fg-6541-parsing-failure-when-struct-member-and-struct-have-the-same branch February 13, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants