Created
April 4, 2023 20:37
-
-
Save amarachiugwu/d2bb22b5b7d29d5881ed44e7b35cad1a 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.9; | |
| // GGGF -> Great Grand Grand Father | |
| // GGF -> Great Grand Father | |
| // GF -> Grand Father | |
| // F -> Father | |
| contract GGGF { | |
| function name () public pure virtual returns ( string memory) { | |
| return 'GGGF'; | |
| } | |
| } | |
| contract GGF is GGGF{ | |
| function name () public pure virtual override returns ( string memory) { | |
| return 'GGF'; | |
| } | |
| function a () public pure returns ( string memory) { | |
| return 'a'; | |
| } | |
| } | |
| contract GF is GGGF, GGF{ | |
| function name () public pure virtual override(GGGF, GGF) returns ( string memory) { | |
| return 'GF'; | |
| } | |
| function b () public pure returns ( string memory) { | |
| return 'b'; | |
| } | |
| } | |
| contract F is GGGF, GGF, GF{ | |
| function name () public pure override(GGGF, GGF, GF) returns ( string memory) { | |
| return 'F'; | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment