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

Unified Diff: pkg/kernel/lib/transformations/closure/invalidate_closures.dart

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Comments. 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
« no previous file with comments | « pkg/kernel/lib/transformations/closure/converter.dart ('k') | pkg/kernel/testcases/closures/arity.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/closure/invalidate_closures.dart
diff --git a/pkg/kernel/lib/transformations/closure/invalidate_closures.dart b/pkg/kernel/lib/transformations/closure/invalidate_closures.dart
index 96e281e2b1990a992f4c53fb8f42f621aa00bd88..6cbbf76401ac70d983cf024b7c2cb72893ba36fb 100644
--- a/pkg/kernel/lib/transformations/closure/invalidate_closures.dart
+++ b/pkg/kernel/lib/transformations/closure/invalidate_closures.dart
@@ -18,6 +18,7 @@ class InvalidateClosures extends Transformer {
}
void invalidate(FunctionNode function) {
+ if (function.asyncMarker != AsyncMarker.Sync) return;
var position = function.location;
function.body = new ExpressionStatement(new Throw(
new StringLiteral("Calling unconverted closure at $position")))
« no previous file with comments | « pkg/kernel/lib/transformations/closure/converter.dart ('k') | pkg/kernel/testcases/closures/arity.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698