This repository has been archived by the owner on Jan 14, 2025. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flow analysis currently has a bug preventing for-each loop variables from being properly promoted in the presence of closures (dart-lang/sdk#43136); as a result of this bug the source_span package had two non-null assertions that ought to have been unnecessary. I'm preparing a fix for that bug, however if I land it as is, it will cause the front end to emit errors saying "Operand of null-aware operation '!' has type '_Highlight' which excludes null"; this in turn will cause SDK bot breakages (since source_span is imported into the SDK repo). So, in order to land the fix, we need to first update the source_span package to work around the bug; this change does that by allocating a temporary variable (which *is* promoted correctly). Once the fix for dart-lang/sdk#43136 lands, I will make a follow-up change that deletes the temporary variable.
- Loading branch information