6969a6edd3
The old code tries to determine something by using a forwarding listener without forwarding to anything. It leaked a rewrite though, meaning that the rewrite stayed, but the error given when rewriting wasn't passed on. When then parsing it with the real listener, the rewrite was in effect and there was no error to report. In total no errors were reported. This fixes the issue by undoing any rewrites in this situation. Fixes https://github.com/dart-lang/sdk/issues/47020 Change-Id: I5342ae6969f00dea830fb7abb30f21932907b8bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236540 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Jens Johansen <jensj@google.com>