mirror of
https://github.com/dart-lang/sdk
synced 2024-10-07 13:35:19 +00:00
727eaf1a0f
In addition to the underlying type (stored as either a cid or an AbstractType), CompileTypes also store two flags: whether a value of the type can be null and whether it can be a sentinel. When constraining the type of a definition via a RedefinitionInstr, the resulting type should be nullable only if both the original and constrained type are. Similarly, the resulting type should only allow the sentinel value if both the original and constrained type do. When the underlying type is represented by a cid, this was already the case. When it is represented by an AbstractType, only nullability was appropriately handled. This CL fixes it so that the possibility of being a sentinel is also handled correctly in the latter case. TEST=vm/cc/TypePropagator_RedefineCanBeSentinelWithCannotBe Bug: https://github.com/dart-lang/sdk/issues/47739 Change-Id: I9d51b1c14ff385d522309f9c984a25dc6bdfbbf4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220767 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Daco Harkes <dacoharkes@google.com> |
||
---|---|---|
.. | ||
bin | ||
docs | ||
include | ||
lib | ||
observatory | ||
observatory_2 | ||
platform | ||
tests | ||
third_party | ||
tools | ||
vm | ||
.clang-tidy | ||
.gitignore | ||
BUILD.gn | ||
codereview.settings | ||
configs.gni | ||
CPPLINT.cfg | ||
PRESUBMIT.py | ||
runtime_args.gni |