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

Unified Diff: pkg/dev_compiler/lib/js/amd/dart_sdk.js

Issue 2699053002: treat void as a top type, analyzer fix for #28763
Patch Set: Created 3 years, 10 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:
Download patch
Index: pkg/dev_compiler/lib/js/amd/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/amd/dart_sdk.js b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
index b6da6fe94b83b59071f73e131a3fc186a5e93925..33a77747ac06d06921e206bf55bf6f0704e45df2 100644
--- a/pkg/dev_compiler/lib/js/amd/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
@@ -10439,7 +10439,7 @@ define([], function() {
if (async.Future.is(newValue)) {
subscription.pause();
- newValue.then(dart.void)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
+ newValue.then(dart.dynamic)(add, {onError: addError}).whenComplete(dart.bind(subscription, 'resume'));
} else {
controller.add(E.as(newValue));
}
@@ -18845,7 +18845,7 @@ define([], function() {
onDone(handleDone) {}
pause(resumeSignal) {
if (resumeSignal === void 0) resumeSignal = null;
- if (resumeSignal != null) resumeSignal.then(dart.void)(dart.bind(this, _resume));
+ if (resumeSignal != null) resumeSignal.then(dart.dynamic)(dart.bind(this, _resume));
this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1;
}
resume() {
@@ -39591,7 +39591,7 @@ define([], function() {
dart.fn(onReady, RandomAccessFileTovoid());
const onOpenFile = (function(file) {
if (dart.notNull(this[_position$0]) > 0) {
- file.setPosition(this[_position$0]).then(dart.void)(onReady, {onError: dart.fn((e, s) => {
+ file.setPosition(this[_position$0]).then(dart.dynamic)(onReady, {onError: dart.fn((e, s) => {
this[_controller$0].addError(e, core.StackTrace._check(s));
this[_readInProgress] = false;
this[_closeFile]();
@@ -39608,7 +39608,7 @@ define([], function() {
}).bind(this);
dart.fn(openFailed, dynamicAnddynamicTovoid$());
if (this[_path$] != null) {
- io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.void)(onOpenFile, {onError: openFailed});
+ io.File.new(this[_path$]).open({mode: io.FileMode.READ}).then(dart.dynamic)(onOpenFile, {onError: openFailed});
} else {
try {
onOpenFile(io._File._openStdioSync(0));
@@ -43217,7 +43217,7 @@ define([], function() {
return this.done;
}
[_closeTarget]() {
- this[_target$].close().then(dart.void)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
+ this[_target$].close().then(dart.dynamic)(dart.bind(this, _completeDoneValue), {onError: dart.bind(this, _completeDoneError)});
}
get done() {
return this[_doneCompleter].future;
@@ -43874,7 +43874,7 @@ define([], function() {
} else {
future = FutureOfHttpClientResponse().value(response);
}
- future.then(dart.void)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
+ future.then(dart.dynamic)(dart.fn(v => this[_responseCompleter].complete(v), HttpClientResponseTovoid()), {onError: dart.bind(this[_responseCompleter], 'completeError')});
}
[_onError$](error, stackTrace) {
this[_responseCompleter].completeError(error, stackTrace);
@@ -44519,7 +44519,7 @@ define([], function() {
close() {
this.closed = true;
this[_httpClient][_connectionClosed](this);
- this[_streamFuture].then(dart.void)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
+ this[_streamFuture].then(dart.dynamic)(dart.fn(_ => this[_socket].destroy(), dynamicTovoid$()));
}
createProxyTunnel(host, port, proxy, callback) {
let request = this.send(core.Uri.new({host: core.String._check(host), port: core.int._check(port)}), core.int._check(port), "CONNECT", io._Proxy._check(proxy));
@@ -44678,7 +44678,7 @@ define([], function() {
if (client.maxConnectionsPerHost != null && dart.notNull(this[_active].length) + dart.notNull(this[_connecting]) >= dart.notNull(client.maxConnectionsPerHost)) {
let completer = async.Completer.new();
this[_pending$].add(dart.fn(() => {
- this.connect(uriHost, uriPort, proxy, client).then(dart.void)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
+ this.connect(uriHost, uriPort, proxy, client).then(dart.dynamic)(dart.bind(completer, 'complete'), {onError: dart.bind(completer, 'completeError')});
}, VoidToNull()));
return FutureOf_ConnectionInfo()._check(completer.future);
}
@@ -49220,7 +49220,7 @@ define([], function() {
this[_closedWrite] = true;
this[_closedRead] = true;
if (this[_socket] != null) {
- this[_socket].close().then(dart.void)(dart.bind(this, _completeCloseCompleter));
+ this[_socket].close().then(dart.dynamic)(dart.bind(this, _completeCloseCompleter));
} else {
this[_completeCloseCompleter]();
}
@@ -51581,7 +51581,7 @@ define([], function() {
}
bind(stream) {
stream.listen(dart.fn(request => {
- io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.void)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
+ io._WebSocketTransformerImpl._upgrade(request, this[_protocolSelector], this[_compression]).then(dart.dynamic)(dart.fn(webSocket => this[_controller$0].add(webSocket), WebSocketTovoid())).catchError(dart.bind(this[_controller$0], 'addError'));
}, HttpRequestToNull()), {onDone: dart.fn(() => {
this[_controller$0].close();
}, VoidToNull())});
« no previous file with comments | « pkg/analyzer/test/src/task/strong/inferred_type_test.dart ('k') | pkg/dev_compiler/lib/js/common/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698