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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart

Issue 3003613002: improve DDC's type checks (Closed)
Patch Set: format Created 3 years, 4 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
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart
index 63c2e11c3f149a5628032f851c7f87795a2c339b..4969414d0cf1f492adda22121bb6b4da7f6ea83a 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/generators.dart
@@ -185,7 +185,9 @@ final _AsyncStarStreamController = JS(
// that we should schedule `await` in `async*` the same as in `async`.
this.isWaiting = true;
let future = iter.value;
- if (!$instanceOf(future, ${getGenericClass(Future)})) {
+ // TODO(jmesserly): `async` uses a different check that looks for the
+ // (private) implementation type of `Future`, rather than the public type.
+ if (!$Future.is(future)) {
future = $Future.value(future);
}
return future.then($dynamic)((x) => this.runBody(x),

Powered by Google App Engine
This is Rietveld 408576698