0

I'm having a problem declaring the enum Stage.

The previous declaration is here:

enum stage {Init, Reg, Vote, Done}

Changing the Stage name doesn't help:

enum stage {Init, Reg, Vote, Done}
Stage public stage = Stage.Init;   
0

Change either the name of the enum or the name of the public property of Stage type.

0

In terms of naming convention, you would normally use capitalised words for your enum declarations and mixed case for variables.

This Solidity guideline will help you.

As per your specific case:

enum Stage {Init, Reg, Vote, Done}

Stage public stage = Stage.Init;  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.