Skip to content

fix(09_Constant): initialize IMMUTABLE_BLOCK - #955

Open
auyua9 wants to merge 1 commit into
AmazingAng:mainfrom
auyua9:fix/zh-09-constant-immutable-init
Open

auyua9 wants to merge 1 commit into
AmazingAng:mainfrom
auyua9:fix/zh-09-constant-immutable-init

Conversation

@auyua9

@auyua9 auyua9 commented Sep 9, 2026

Copy link
Copy Markdown

What changed

The Chinese 09_Constant example assigns IMMUTABLE_NUM again in the constructor while leaving IMMUTABLE_BLOCK uninitialized. This causes the example to fail compilation under Solidity 0.8.x and disagrees with the working localized examples.

This PR replaces the erroneous constructor assignment with IMMUTABLE_BLOCK = block.number and updates the matching README code block.

Scope

  • 09_Constant/Constant.sol
  • 09_Constant/readme.md

No runtime dependency or unrelated cleanup is included.

Verification

  • git diff --check
  • Compared the corrected initialization with Languages/en, Languages/es, Languages/ja, and Languages/pt-br versions
  • Local forge/solc binaries were unavailable for a compile run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants