mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
37 lines
553 B
Solidity
37 lines
553 B
Solidity
contract Base {
|
|
uint256 data;
|
|
|
|
function setData(uint256 i) public {
|
|
data = i;
|
|
}
|
|
|
|
function getViaBase() public returns (uint256 i) {
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
contract A is Base {
|
|
function setViaA(uint256 i) public {
|
|
setData(i);
|
|
}
|
|
}
|
|
|
|
|
|
contract B is Base {
|
|
function getViaB() public returns (uint256 i) {
|
|
return getViaBase();
|
|
}
|
|
}
|
|
|
|
|
|
contract Derived is Base, B, A {}
|
|
|
|
// ====
|
|
// compileViaYul: also
|
|
// compileToEwasm: also
|
|
// ----
|
|
// getViaB() -> 0
|
|
// setViaA(uint256): 23 ->
|
|
// getViaB() -> 23
|