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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart

Issue 24268002: Fix bug in the closure methods, where iterating over the boxed variable did not return the variable… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 27646)
+++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
@@ -1665,12 +1665,9 @@
ClosureClassMap closureData =
compiler.closureToClassMapper.computeClosureToClassMapping(
analyzedElement, node, elements);
- ClosureScope scopeData = closureData.capturingScopes[node];
- if (scopeData != null) {
- scopeData.capturedVariableMapping.forEach((variable, field) {
- locals.setCapturedAndBoxed(variable, field);
- });
- }
+ closureData.forEachBoxedVariable((variable, field) {
+ locals.setCapturedAndBoxed(variable, field);
+ });
if (analyzedElement.isField()) {
return visit(node.asSendSet().arguments.head);
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/closure.dart ('k') | tests/compiler/dart2js/simple_inferrer_closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698