019755f77b
At the top of a loop, loop-assigned variables need to be marked as not
definitely unassigned, otherwise we will give incorrect results for
code like this:
```dart
f() {
late int x;
bool firstIteration = true;
while (true) {
if(firstIteration) {
x = 0;
firstIteration = false;
} else {
print(x); // BOGUS ERROR: x definitely unassigned
}
}
}
```
Previously, we were handling this by calling `joinUnassigned` at the
bottom of `removePromotedAll`, but it's simpler to just mark these
variables as not-unassigned while discarding promotions. This change
will make the implementation more closely match spec changes I'll be
making shortly.
Change-Id: If50e28d20a75730aa5187a62ae5cac8690b0dfaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>