Lift restrictions on immutables. #14240
Labels
low impact
Changes are not very noticeable or potential benefits are limited.
medium effort
Default level of effort
must have eventually
Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.
As it turns out that we have several bugs in the
ImmutableValidator
, we prepone our plan of lifting the "assign-once" restrictions during creation that was originally only planned with #13723.Goal is to allow uninitialized immutables (defaulting to zero-value) and multiple assignments to immutable (behaving like regular variables) during creation. At first we can retain the restriction of immutable initializtion (other than direct initialiation at the declaration) having to happen inside the constructor body.
In a subsequent step we can allow assignments to immutables in arbitrary functions, while making it an error if a function writing to any immutable occurs in the call graph of the deployed contract (that is, the function can be called from an external function or indirectly ends up in the internal dispatch due to being taken as function pointer expression potentially even only during creation).
The text was updated successfully, but these errors were encountered: