0662b64697
This is the second part of the referenced issue. Practically, we don't do anything special during demotion, we merely demote when write T to such type S, that T <: S. This S must be a type of interest (tested or declared). If it happens to be nullable, and T < NonNull(S), we will promote to NonNull(S). Bug: https://github.com/dart-lang/sdk/issues/40011 Change-Id: I254b4bfbbfad47fa2c2811def864c8ce0419b7c9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145740 Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>