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);
     }
   }