Closed
Description
This code:
class B<T> {
B(a) : this.named(a);
B.named(a) {}
factory B.redirect(a) = B;
}
produces this error in current strong mode analyzer:
error • The return type 'B<dynamic>' of the redirected constructor isn't assignable to 'B<T>' at /Users/leafp/tmp/test.dart:5:27 • redirect_to_invalid_return_type
I believe that redirecting factory constructors should propagate their type arguments unchanged.
cc @bkonyi @jmesserly @lrhn @eernstg @floitschG @munificent @stereotype441