mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:27:43 +00:00
4090d3b909
The type normalization rules specify that `FutureOr<T>?` is normalized to `FutureOr<T>` when `T` is nullable. However, it's more practical for subtype testing if the declared nullability on the runtime representation of the `FutureOr` type reflects the true nullability (nullable if the `FutureOr` is declared nullable or its type argument is nullable), rather than being normalized as per the spec. This changes the static and dynamic normalization rules in dart2wasm thus and compensates by computing the proper spec normalization when the type is converted to a string. The added test exposed a number of bugs in DDC and the VM: https://github.com/dart-lang/sdk/issues/53175 https://github.com/dart-lang/sdk/issues/53737 https://github.com/dart-lang/sdk/issues/53738 Change-Id: I0ad0a09fe935ccbd3eb65e6958c958d29e0bb088 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320821 Reviewed-by: Lasse Nielsen <lrn@google.com> Commit-Queue: Aske Simon Christensen <askesc@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
.gitignore | ||
api_readme.md | ||
BUILD.gn | ||
OWNERS |