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

fix(sol-macro): snake_case'd function names #226

Merged
merged 2 commits into from
Aug 5, 2023
Merged

Conversation

DaniPopes
Copy link
Member

Motivation

heck doesn't treat numbers as new words, and discards leading underscores, thus:

contract C {
  function f();
  function _f();
}

failed to compile because the generated is_... functions would have the same name for both variants.

Solution

Create a helper function for snakifying idents, taken from strum

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@prestwich
Copy link
Member

just cliipy

@DaniPopes DaniPopes merged commit 5f39812 into main Aug 5, 2023
18 checks passed
@DaniPopes DaniPopes deleted the dani/sol-fn-snake branch August 5, 2023 16:31
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.

2 participants