Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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