-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Dart should support generic methods/functions, similar to Java:
class Foo<E> {
E _item;
/* ... */
<T> T transform(T fn(E)) {
return fn(_item);
}
}
Currently this is supported only by omitting the type information. Additionally, some core Dart code includes the <T> annotation within comments: /<T>/. In order for proper tool/IDE support, Dart should support explicitly declaring generic types for a method.
ScottPierce, DmitryMakhnev, brianegan, Tomucha, jodinathan and 5 more
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug