87a1675c04
The CFE's lowering for record patterns can sometimes make use of late local fields. Dart2JS's late lowerer assumes that all late local fields live in the scope of some function body. Record patterns allow late locals to be created in other contexts though. Some examples that break this assumption include field initializers and expressions in constructor initializer lists. To fix this we add a late local scope in some extra contexts where these record patterns can show up. Fixes: 53358 Change-Id: If43b4dd393d0249e6557a54e6e455d52b39e97c6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323020 Reviewed-by: Mayank Patke <fishythefish@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>