solidity/test/libsolidity/syntaxTests/constants/immutable_at_file_level.sol

5 lines
211 B
Solidity
Raw Normal View History

2020-09-25 10:21:55 +00:00
uint immutable x = 7;
// ----
// DeclarationError 8342: (0-20): Only constant variables are allowed at file level.
// DeclarationError 8297: (0-20): The "immutable" keyword can only be used for state variables.