Skip to content

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

@beta-ziliani

Description

@beta-ziliani

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions