solidity/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol

27 lines
335 B
Solidity
Raw Normal View History

contract BaseBase {
uint256 m_a;
2020-06-23 12:14:24 +00:00
constructor(uint256 a) {
m_a = a;
}
}
contract Base is BaseBase(7) {
2020-06-23 12:14:24 +00:00
constructor() {
m_a *= m_a;
}
}
contract Derived is Base {
function getA() public returns (uint256 r) {
return m_a;
}
}
// ====
// compileViaYul: also
// ----
// getA() -> 49