Skip to content

Instantly share code, notes, and snippets.

@sh4869
Created Jun 26, 2017
Embed
What would you like to do?
class Parent {
}
class Child extends Parent {
}
typedef void F(Parent arg);
void _f(Child a){
}
class TestClass {
final F f;
TestClass(this.f);
}
void main(){
var x = new TestClass(_f);
assert(_f is F);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment