Created
June 28, 2023 23:23
-
-
Save bradcypert/bb13e2f585a49ade106fe764e4089af8 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
class Monster {} | |
class Slime extends Monster {} | |
class Wolf extends Monster {} | |
final w = Wolf(); | |
void main() { | |
print([Slime, Wolf].any((Type t) => w is t)); | |
//print([Slime, Wolf].any((Type t) => w.runtimeType == t)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment