solidity/test/libsolidity/syntaxTests/immutable/inheritance_ctor_inherit_specifier_argument_init.sol

14 lines
276 B
Solidity

contract B {
uint immutable x;
constructor(uint _x) public {
x = _x;
}
}
contract C is B(C.y = 3) {
uint immutable y;
}
// ----
// TypeError 1581: (111-114): Immutable variables can only be initialized inline or assigned directly in the constructor.