Last active
February 25, 2021 15:37
-
-
Save guid-empty/03a7b552f1d631b66166d1104d2e1d5f to your computer and use it in GitHub Desktop.
Dart.Language.Generics & problem
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
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