solidity/test/libsolidity/syntaxTests/immutable/inheritance_ctor_inherit_specifier_argument_init.sol
2020-04-02 13:52:27 +02:00

14 lines
271 B
Solidity

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