Skip to content

Instantly share code, notes, and snippets.

@nishtahir
Last active February 8, 2020 01:47
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 nishtahir/0e8a126bf379cbb45bd9d9235bc288cd to your computer and use it in GitHub Desktop.
Save nishtahir/0e8a126bf379cbb45bd9d9235bc288cd to your computer and use it in GitHub Desktop.
The Dart type system is weird
void main() {
List<String> test = ["hello"];
print("expected: true, actual : ${test is List<String>}");
print("expected: false, actual : ${test is List<int>}");
print("expected: false, actual : ${test is List<void>}");
print("expected: true, actual : ${test is List<dynamic>}");
print("Welcome to the void...");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment