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 93c0d71036e24a27404856632a8833845dabb9e1..e1865f7fd6d90a6c04a8e0dbeba37456490f612f 100644 |
--- a/pkg/kernel/lib/transformations/closure/converter.dart |
+++ b/pkg/kernel/lib/transformations/closure/converter.dart |
@@ -414,7 +414,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); |