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

12 lines
319 B
Solidity

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