Last active
March 8, 2020 02:20
-
-
Save jodinathan/bf386455c236384861927f40101bbfda to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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