solidity/test/libsolidity/syntaxTests/immutable/variable_declaration_value.sol
2020-08-28 19:06:34 +01:00

6 lines
204 B
Solidity

contract C {
int immutable x = x = 5;
}
// ----
// TypeError 1581: (35-36): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.