Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FutureOrType to package:kernel #40123

Closed
johnniwinther opened this issue Jan 14, 2020 · 1 comment
Closed

Add FutureOrType to package:kernel #40123

johnniwinther opened this issue Jan 14, 2020 · 1 comment
Assignees
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. NNBD Issues related to NNBD Release
Milestone

Comments

@johnniwinther
Copy link
Member

No description provided.

@johnniwinther johnniwinther added area-front-end Use area-front-end for front end / CFE / kernel format related issues. NNBD Issues related to NNBD Release labels Jan 14, 2020
@johnniwinther johnniwinther added this to the D29 Release milestone Jan 14, 2020
@johnniwinther
Copy link
Member Author

Currently FutureOr is encoded as an InterfaceType. This means that the DartType.nullability doesn't not hold the semantic but rather the declared nullability for FutureOr types:

Both FutureOr<int?> and FutureOr<int> have nullability Nullability.nonNullable but Null is semantically included in the former. Currently computeNullabilityOfFutureOr located in pkg/kernel/lib/src/future_or.dart is used to compute the semantic nullability of FutureOr types.

dart-bot pushed a commit that referenced this issue May 15, 2020
For some types it makes sense to distinguish between nullability as a
property of including null and the declared nullability, such as for
type-parameter types and FutureOr types.  This CL introduces the
separation between the two concepts.  The plan is to use that when
implementing FutureOrType.

Bug: #40123
Change-Id: I90b45bea768e89c213d021d360a481d38377c682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147903
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. NNBD Issues related to NNBD Release
Projects
None yet
Development

No branches or pull requests

2 participants