commit | afe3e68841f93e8c7bf4f73243208a663026b30d | [log] [tgz] |
---|---|---|
author | Peter von der Ahé <ahe@google.com> | Mon Nov 12 11:35:22 2018 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Mon Nov 12 11:35:22 2018 +0000 |
tree | 385a57b6cfd1c3d18d029f5d8359f2ca01972598 | |
parent | 127852deedd64f17df53be13e18e89577cded88e [diff] |
Is-not doesn't lead to promotion Change-Id: I2458248080e58564bc0ae807adf731802f5ef2cc Reviewed-on: https://dart-review.googlesource.com/c/84025 Commit-Queue: Peter von der Ahé <ahe@google.com> Commit-Queue: Kevin Millikin <kmillikin@google.com> Auto-Submit: Peter von der Ahé <ahe@google.com> Reviewed-by: Kevin Millikin <kmillikin@google.com>
diff --git a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart index edc9e62..a5075bc 100644 --- a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart +++ b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
@@ -781,7 +781,7 @@ void handleIsOperator(Token isOperator, Token not) { debugEvent("IsOperator", isOperator); Declaration lhs = state.popPushNull(isOperator.lexeme, isOperator); - if (lhs is UnspecifiedDeclaration) { + if (not == null && lhs is UnspecifiedDeclaration) { state.registerPromotionCandidate(lhs, isOperator); } }