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

14 lines
363 B
Solidity

contract Base {
address public immutable user = address(0x0);
}
contract Derived is Base {}
contract Test {
function test() public pure returns(bytes memory) {
return type(Derived).runtimeCode;
}
}
// ----
// TypeError 9274: (185-210='type(Derived).runtimeCode'): "runtimeCode" is not available for contracts containing immutable variables.