Skip to content

Instantly share code, notes, and snippets.

@Roger-Wu
Last active April 17, 2018 08:09
Show Gist options
  • Save Roger-Wu/cfad61b9d81a31308fb77d711199772e to your computer and use it in GitHub Desktop.
Save Roger-Wu/cfad61b9d81a31308fb77d711199772e to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.21;
contract A {
uint public a = 0;
function f() internal {
a = a * 10 + 1;
g();
}
function g() internal {
a = a * 10 + 2;
}
}
contract B is A {
function f() internal {
a = a * 10 + 3;
super.f();
}
function g() internal {
a = a * 10 + 4;
super.g();
}
}
contract C is B {
function fp() public {
super.f();
}
function fpA() public {
A.f();
}
function fpB() public {
B.f();
}
function reset() public {
a = 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment