solidity/test/libsolidity/syntaxTests/immutable/inheritance_ctor_inherit_specifier_argument_init.sol
2020-07-07 12:16:18 +02:00

14 lines
269 B
Solidity

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