Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: sdk/lib/convert/converter.dart

Issue 2529393002: Make core libraries use generic method syntax. (Closed)
Patch Set: Merge to head Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/convert/converter.dart
diff --git a/sdk/lib/convert/converter.dart b/sdk/lib/convert/converter.dart
index 75d4cf0403af5d1de95276bcad9fd6db91532e74..1bb85acd9f7da9a6cbc0917f52cc1bad25a92e03 100644
--- a/sdk/lib/convert/converter.dart
+++ b/sdk/lib/convert/converter.dart
@@ -10,7 +10,7 @@ part of dart.convert;
* It is recommended that implementations of `Converter` extend this class,
* to inherit any further methods that may be added to the class.
*/
-abstract class Converter<S, T> implements StreamTransformer/*<S, T>*/ {
+abstract class Converter<S, T> implements StreamTransformer<S, T> {
const Converter();
/**
@@ -24,9 +24,9 @@ abstract class Converter<S, T> implements StreamTransformer/*<S, T>*/ {
* Encoding with the resulting converter is equivalent to converting with
* `this` before converting with `other`.
*/
- Converter<S, dynamic/*=TT*/> fuse/*<TT>*/(
- Converter<T, dynamic/*=TT*/> other) {
- return new _FusedConverter<S, T, dynamic/*=TT*/>(this, other);
+ Converter<S, TT> fuse<TT>(
floitsch 2016/12/13 12:42:25 Move to one line.
Lasse Reichstein Nielsen 2016/12/13 14:28:03 Done.
+ Converter<T, TT> other) {
+ return new _FusedConverter<S, T, TT>(this, other);
}
/**
@@ -35,13 +35,13 @@ abstract class Converter<S, T> implements StreamTransformer/*<S, T>*/ {
* The returned sink serves as input for the long-running conversion. The
* given [sink] serves as output.
*/
- Sink/*<S>*/ startChunkedConversion(Sink/*<T>*/ sink) {
+ Sink<S> startChunkedConversion(Sink<T> sink) {
throw new UnsupportedError(
"This converter does not support chunked conversions: $this");
}
- Stream/*<T>*/ bind(Stream/*<S>*/ stream) {
- return new Stream/*<T>*/.eventTransformed(
+ Stream<T> bind(Stream<S> stream) {
+ return new Stream<T>.eventTransformed(
stream,
(EventSink sink) => new _ConverterStreamEventSink(this, sink));
}
@@ -61,7 +61,7 @@ class _FusedConverter<S, M, T> extends Converter<S, T>
T convert(S input) => _second.convert(_first.convert(input));
- Sink/*<S>*/ startChunkedConversion(Sink/*<T>*/ sink) {
+ Sink<S> startChunkedConversion(Sink<T> sink) {
return _first.startChunkedConversion(_second.startChunkedConversion(sink));
}
}

Powered by Google App Engine
This is Rietveld 408576698