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

7 lines
251 B
Solidity

contract C { constructor(uint) {} }
contract D is C(D.t = 2) {
uint immutable t;
}
// ----
// TypeError 1581: (52-55='D.t'): Cannot write to immutable here: Immutable variables can only be initialized inline or assigned directly in the constructor.