Last active
April 17, 2018 08:09
-
-
Save Roger-Wu/cfad61b9d81a31308fb77d711199772e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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