Created
October 8, 2021 12:06
-
-
Save sepisoltani/c8f37821801756cce4d6e7533de68258 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
contract Sandwich { | |
uint private sandwichesEaten = 0; | |
function eat() internal { | |
sandwichesEaten++; | |
} | |
} | |
contract BLT is Sandwich { | |
uint private baconSandwichesEaten = 0; | |
function eatWithBacon() public returns (string memory) { | |
baconSandwichesEaten++; | |
// We can call this here because it's internal | |
eat(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment