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

Failing to resolve binding to enum member via using for #1196

Open
beta-ziliani opened this issue Dec 18, 2024 · 0 comments
Open

Failing to resolve binding to enum member via using for #1196

beta-ziliani opened this issue Dec 18, 2024 · 0 comments
Assignees

Comments

@beta-ziliani
Copy link
Contributor

beta-ziliani commented Dec 18, 2024

In the following example the last id() call isn't resolved.

enum Answer {
  Yes
}

library Id {
  function id(Answer ans) returns (Answer) {
    return ans;
  }
}

contract Test {
  using Id for Answer;

  function testFunc() returns (Answer) {
    Answer.Yes.id();
  }
}

EDIT: if the enum member is first stored Answer value = Answer.Yes; value.id(), then it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ⏳ Todo
Development

No branches or pull requests

2 participants