solidity/test/libsolidity/syntaxTests/constants/immutable_at_file_level.sol
2022-04-01 23:41:18 -05:00

5 lines
257 B
Solidity

uint immutable x = 7;
// ----
// DeclarationError 8342: (0-20='uint immutable x = 7'): Only constant variables are allowed at file level.
// DeclarationError 8297: (0-20='uint immutable x = 7'): The "immutable" keyword can only be used for state variables.