Last active
July 31, 2018 23:25
-
-
Save nex3/0c52e7cb214d8884f4f828370f9c9330 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
class Super { | |
bool get isSub => false; | |
void doAThing() { | |
if (isSub) throw "no"; | |
// ... | |
} | |
} | |
class Sub extends Super { | |
bool get isSub => true; | |
} |
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
class Super { | |
void doAThing() { | |
// ... | |
} | |
} | |
class Sub extends Super { | |
void doAThing() { | |
throw "no"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment