Allow type variables, not just type literals, as type parameters #11033
Labels
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
closed-duplicate
Closed in favor of an existing report
type-enhancement
A request for a change that isn't a bug
For type checking on certain factory functions, it'd be very nice to allow specifying type parameters from variables, not just literals.
Example:
class A<T> {
String toString() => "A<$T>";
}
A makeA(Type t) => new A<t>();
main() {
var a = makeA(String);
print("a = $a");
}
The text was updated successfully, but these errors were encountered: