Cannot pass a generic type as an argument #18757
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
This issue was originally filed by @jolleekin
Let's say I have a method
dynamic decode(String text, Type type)
I tried to call it this way
var x = decode('[1,2,3]', List<int>) as List<int>;
However, the editor says
The text was updated successfully, but these errors were encountered: