Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(solidity-101/09_Constant): replace solidity version about immutable from v8.0.21 to v0.8.21 #232

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/solidity-101/09_Constant/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ address constant CONSTANT_ADDRESS = 0x0000000000000000000000000000000000000000;

### immutable

`immutable`变量可以在声明时或构造函数中初始化,因此更加灵活。在`Solidity v8.0.21`以后,`immutable`变量不需要显式初始化。反之,则需要显式初始化。
`immutable`变量可以在声明时或构造函数中初始化,因此更加灵活。在`Solidity v0.8.21`以后,`immutable`变量不需要显式初始化。反之,则需要显式初始化。
若`immutable`变量既在声明时初始化,又在constructor中初始化,会使用constructor初始化的值。

``` solidity
Expand Down