-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Extend the typechecker so that it detects when a state variable declared as constant may be assigned somewhere in the contract other than in its declaration. For example, the contract:
contract C {
int constant N=1;
constructor() { N=2; }
function f(int n) external { }
}should not pass typechecking, because N is assigned in the constructor.
Additionally, check that constants are always initialized. For example, the contract:
contract C {
int constant N;
constructor() { }
function f(int n) external { }
}should not pass type checking.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request