Remove expression info invalidation from nonNullAssert_end.
This logic was a hack that was needed for the null safety migration
tool, to account for the fact that when inserting a non-null assertion
operator (`!`), it used the same Expression object to refer to the
non-null assertion operation as it did to refer to the operand. So the
normal flow analysis mechanism for ignoring irrelevant expression info
(noticing that the expressions are different) didn't work.
Now that the null safety migration tool no longer exists, flow
analysis no longer needs this hack.
Change-Id: I63a504371a70e3eb0b43303010cb0b4eac032479
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389262
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
diff --git a/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart b/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
index 4e04c25..178f577 100644
--- a/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
@@ -5042,8 +5042,6 @@
if (operandReference != null) {
_current = _current.tryMarkNonNullable(this, operandReference).ifTrue;
}
- // Invalidate any expression info that was associated with [operand].
- _getExpressionInfo(operand);
}
@override