Declaration Error: Identifier already declared

Declaration Error: Identifier already declared

Manage alerts

Loading saved threads...

rafonix_ · External communityPost link
External question — Ethereum Stack Exchange Author: rafonix_ Original post: https://ethereum.stackexchange.com/questions/93966 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. 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;
Quote
Report
3DLures · External communityPost link
External answer — Ethereum Stack Exchange Author: 3DLures Original post: https://ethereum.stackexchange.com/a/93967 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Change either the name of the enum or the name of the public property of Stage type.
Quote
Report
s3rGi · External communityPost link
External answer — Ethereum Stack Exchange Author: s3rGi Original post: https://ethereum.stackexchange.com/a/93977 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. 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;
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External question — Ethereum Stack Exchange Author: rafonix_ Source score (net votes, not local likes): 0 Original post: https://ethereum.stackexchange.com/questions/93966 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. 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;

Cancel quote

Checking account access…