Last active
May 6, 2020 02:18
-
-
Save psygo/aa6fffc4b467e08eb06746ccc0cf8850 to your computer and use it in GitHub Desktop.
Dart Inheritance Check With `is`
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
main() { | |
print(ClassWithInheritance is BaseClass); // gives `false` | |
print(InterfaceImplementer is InterfaceExample); // gives `false` | |
} | |
class BaseClass {} | |
class ClassWithInheritance extends BaseClass {} | |
abstract class InterfaceExample {} | |
class InterfaceImplementer implements InterfaceExample {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment