Created
May 22, 2020 13:58
-
-
Save maurelian/caabeaffa07ca1bfdfc96efd9eed47ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.6.0; | |
contract Test { | |
uint public immutable something = 20; | |
constructor() public { | |
something = block.timestamp; | |
// TypeError: Immutable state variable already initialized. | |
// something = block.timestamp; | |
// ^-------^ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment