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

feat: enumerate overloaded functions if they are nameless #545

Merged
merged 5 commits into from
Oct 31, 2021

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Oct 30, 2021

Motivation

Close #543

Solution

generate aliases using the call's indices if the function params are nameless like

    abigen!(
        ConsoleLog,
        r#"[
            log()
            log(string, string)
            log(string)
    ]"#
    );

becomes

enum    ConsoleLogCalls {
    Log0,
    Log1(...),
    Log2(...),
}

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@gakonst
Copy link
Owner

gakonst commented Oct 31, 2021

LGTM

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.

abigen! fails for functions with same name, different args
2 participants