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

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

Issue 2939043002: Remove unnecessary contexts in closure conversion (Closed)
Patch Set: Don't treat constructor parameters in initializers as captured Created 3 years, 6 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/kernel/lib/transformations/closure/converter.dart
diff --git a/pkg/kernel/lib/transformations/closure/converter.dart b/pkg/kernel/lib/transformations/closure/converter.dart
index ecf7efbd8e1c4cf59dfb0a3d6160356678d8f93f..410386f18f72f3d70e8d15bac2cb5d6734074f02 100644
--- a/pkg/kernel/lib/transformations/closure/converter.dart
+++ b/pkg/kernel/lib/transformations/closure/converter.dart
@@ -416,7 +416,7 @@ class ClosureConverter extends Transformer {
// We rename the getter to avoid an indirection in most cases.
Name oldName = node.name;
node.name = tearOffName;
- node.reference.canonicalName.unbind();
+ node.canonicalName?.unbind();
addGetterForwarder(oldName, node);
} else if (node.kind == ProcedureKind.Method) {
addTearOffMethod(tearOffName, node);
« no previous file with comments | « no previous file | pkg/kernel/lib/transformations/closure/info.dart » ('j') | pkg/kernel/lib/transformations/closure/info.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698