Index: pkg/compiler/lib/src/js_model/closure.dart |
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart |
index 7202e5ce7e733a36b12efa70d8e26e8b12da4c4e..3c6446bb534e02e6b3b966715ccf280bcaab3f73 100644 |
--- a/pkg/compiler/lib/src/js_model/closure.dart |
+++ b/pkg/compiler/lib/src/js_model/closure.dart |
@@ -145,8 +145,14 @@ class KernelClosureConversionTask extends ClosureConversionTask<ir.Node> { |
@override |
// TODO(efortuna): Eventually closureRepresentationMap[node] should always be |
// non-null, and we should just test that with an assert. |
- ClosureRepresentationInfo getClosureRepresentationInfo(Entity entity) => |
- _closureRepresentationMap[entity] ?? const ClosureRepresentationInfo(); |
+ ClosureRepresentationInfo getClosureRepresentationInfo(Entity entity) { |
+ if (entity is ConstructorBodyEntity) { |
+ ConstructorBodyEntity constructorBody = entity; |
+ entity = constructorBody.constructor; |
Siggi Cherem (dart-lang)
2017/07/07 20:00:25
it might be nice to do this at the call site thoug
Johnni Winther
2017/07/10 14:11:33
Long-term constructor body should have there own a
|
+ } |
+ return _closureRepresentationMap[entity] ?? |
+ const ClosureRepresentationInfo(); |
+ } |
} |
class KernelScopeInfo extends ScopeInfo { |