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

Leave constants as is when making namespaced input #1009

Merged
merged 5 commits into from
Apr 16, 2024

Conversation

ericglau
Copy link
Member

@ericglau ericglau commented Apr 11, 2024

Fixes #977

The plugin makes a modified copy of the solc input in order to extract types for namespaced struct definitions.

For variable declarations, we normally convert them to dummy enums since they aren't needed, but we avoid deleting them to avoid messing up NatSpec associations as explained in #918 (comment).

However, constants could be referenced in a struct definition as demonstrated in #977. These could also be used in namespaced structs. So for constants, we should not convert them to enums but leave them as is.

@ericglau ericglau changed the title Handle constants when making namespaced input Leave constants as is when making namespaced input Apr 11, 2024
@ericglau ericglau requested a review from a team April 11, 2024 21:23
@ericglau ericglau enabled auto-merge (squash) April 16, 2024 19:44
@ericglau ericglau merged commit 20f0207 into OpenZeppelin:master Apr 16, 2024
11 checks passed
@ericglau ericglau deleted the 977 branch April 16, 2024 19:47
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.

"Undeclared identifier" when using constant inside a library
3 participants