Skip to content

Instantly share code, notes, and snippets.

@jodinathan
Last active March 8, 2020 02:20
Show Gist options
  • Save jodinathan/bf386455c236384861927f40101bbfda to your computer and use it in GitHub Desktop.
Save jodinathan/bf386455c236384861927f40101bbfda to your computer and use it in GitHub Desktop.
class A<T extends dynamic> {
Function(A<T>) go;
}
class B<T extends dynamic> extends A<T> {
}
void main() async {
A b = B()..go = (foo) {
print('test');
};
b.go(b);
A a = A<String>()..go = (foo) {
print('aa');
};
a.go(a);
b = B<String>()..go = (foo) {
print('test2');
};
b.go(b);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment