Skip to content

Instantly share code, notes, and snippets.

@nex3
Last active July 31, 2018 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nex3/0c52e7cb214d8884f4f828370f9c9330 to your computer and use it in GitHub Desktop.
Save nex3/0c52e7cb214d8884f4f828370f9c9330 to your computer and use it in GitHub Desktop.
class Super {
bool get isSub => false;
void doAThing() {
if (isSub) throw "no";
// ...
}
}
class Sub extends Super {
bool get isSub => true;
}
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