2020-03-09 21:14:07 +00:00
|
|
|
contract Base {
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor() {}
|
2020-03-09 21:14:07 +00:00
|
|
|
|
|
|
|
uint256 m_base = 5;
|
|
|
|
|
|
|
|
function getBMember() public returns (uint256 i) {
|
|
|
|
return m_base;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
contract Derived is Base {
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor() {}
|
2020-03-09 21:14:07 +00:00
|
|
|
|
|
|
|
uint256 m_derived = 6;
|
|
|
|
|
|
|
|
function getDMember() public returns (uint256 i) {
|
|
|
|
return m_derived;
|
|
|
|
}
|
|
|
|
}
|
2020-04-17 20:24:33 +00:00
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2021-03-12 23:02:36 +00:00
|
|
|
// compileViaYul: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
|
|
|
// getBMember() -> 5
|
|
|
|
// getDMember() -> 6
|