Skip to content

[CP] Adjust nullability computations in the upper bound algorithm in the CFE #53999

@chloestefantsova

Description

@chloestefantsova

Commit(s) to merge

ad298bf

Target

stable

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/333825

Issue Description

Currently the CFE emits some types with incorrect nullability in some cases. According to user reports, it prevents using package typings. The issue is reported for the DDC, but other platforms may be affected as well, because the fix is in the core of the CFE code used by all backends.

What is the fix

The fix adjusts the computations of the nullability in the algorithm for the upper bound between two types in the CFE. The fix is small and self-contained.

Why cherry-pick

The user who reported an issue asked for a fix to land sooner. It seems that they are blocked in their work by being unable to use package typings and don't have a work-around.

Risk

low

Issue link(s)

#52726

Extra Info

My evaluation of the risk as low is based on the assumption that the fix corrects some malformed programs emitted by the CFE, but leaves the well-formed programs intact.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions