1

Following the documentation I try to add a enum to my interface. Inside the interface I have a method called get that returns one of the enum value. Im trying to add the enum to the interface, because in the get function one of the return value is one value of the enum. I follow this example.

https://solidity.readthedocs.io/en/v0.5.1/contracts.html#interfaces

Error:

TypeError: Enumerable cannot be declared in interfaces

Is wrong the docu??

UnexpectedCharacter
  • 852
  • 1
  • 11
  • 30

1 Answers1

1

If you check the docs for the version of the compiler you're using, located here, it says under note 5 under the Interfaces header that they cannot define enums. If you want the ability to do that, you'll have to upgrade to 0.5.0+

natewelch_
  • 12,021
  • 1
  • 29
  • 43