Created
February 25, 2021 15:39
-
-
Save guid-empty/7c76b0f7a6d9b04ed4b75cfcd8e76528 to your computer and use it in GitHub Desktop.
Dart.Language.Generics & constraints
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() {} | |
class OptimizedCollection<T> { | |
void add(T item) { | |
item.someUsefulAction(); | |
} | |
void remove(T item) { | |
} | |
} | |
abstract class Item { | |
void someUsefulAction(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment