Skip to content

Instantly share code, notes, and snippets.

@guid-empty
Last active February 25, 2021 15:37
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 guid-empty/03a7b552f1d631b66166d1104d2e1d5f to your computer and use it in GitHub Desktop.
Save guid-empty/03a7b552f1d631b66166d1104d2e1d5f to your computer and use it in GitHub Desktop.
Dart.Language.Generics & problem
void main() {}
abstract class MyCollectionItem {}
abstract class MyOptimizedCollection {
void add(MyCollectionItem item);
void remove(MyCollectionItem item);
}
abstract class OtherCollectionItem {}
abstract class OtherOptimizedCollection {
void add(OtherCollectionItem item);
void remove(OtherCollectionItem item);
}
// todo: uncomment this
// abstract class OptimizedCollection<T> {
// void add(T item);
// void remove(T item);
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment