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

Unified Diff: pkg/async/lib/result.dart

Issue 292403002: Fix analyzer warnings! (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months 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
« no previous file with comments | « no previous file | pkg/async/test/result_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/async/lib/result.dart
diff --git a/pkg/async/lib/result.dart b/pkg/async/lib/result.dart
index 903c8a538aa8417901353ca6d6b1a5cf89f09901..db04ae7181ba226eff30e05e164bfbf357279a55 100644
--- a/pkg/async/lib/result.dart
+++ b/pkg/async/lib/result.dart
@@ -198,10 +198,10 @@ class ErrorResult implements Result {
bool get isError => true;
ValueResult get asValue => null;
ErrorResult get asError => this;
- void complete(Completer<T> completer) {
+ void complete(Completer completer) {
completer.completeError(error, stackTrace);
}
- void addTo(EventSink<T> sink) {
+ void addTo(EventSink sink) {
sink.addError(error, stackTrace);
}
Future get asFuture => new Future.error(error, stackTrace);
@@ -238,7 +238,7 @@ class ReleaseStreamTransformer<T> implements StreamTransformer<Result<T>, T> {
return new Stream<T>.eventTransformed(source, _createSink);
}
- static EventSink _createSink(EventSink<Result> sink) {
+ static EventSink<Result> _createSink(EventSink sink) {
return new ReleaseSink(sink);
}
}
@@ -257,7 +257,7 @@ class CaptureSink<T> implements EventSink<T> {
CaptureSink(EventSink<Result<T>> sink) : _sink = sink;
void add(T value) { _sink.add(new ValueResult(value)); }
- void addError(Object error, StackTrace stackTrace) {
+ void addError(Object error, [StackTrace stackTrace]) {
_sink.add(new ErrorResult(error, stackTrace));
}
void close() { _sink.close(); }
@@ -281,7 +281,7 @@ class ReleaseSink<T> implements EventSink<Result<T>> {
_sink.addError(error.error, error.stackTrace);
}
}
- void addError(Object error, StackTrace stackTrace) {
+ void addError(Object error, [StackTrace stackTrace]) {
// Errors may be added by intermediate processing, even if it is never
// added by CaptureSink.
_sink.addError(error, stackTrace);
« no previous file with comments | « no previous file | pkg/async/test/result_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698