Created
August 9, 2022 22:06
-
-
Save AyDeveloper/502bd1c11d3ea526346201602dfd9ae7 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
contract A { | |
function foo() virtual public pure returns (string memory) { | |
return "Foo from A"; | |
} | |
function boo() public pure returns (string memory) { | |
return "Boo from A"; | |
} | |
} | |
contract B is A { | |
function foo() override public pure returns (string memory) { | |
return "I override the Contract A's foo function"; | |
} | |
function boo2() public pure returns (string memory) { | |
return "Boo from B"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment