You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
askeksa opened this issue
Oct 12, 2023
· 2 comments
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P3A lower priority bug or feature requesttriagedIssue has been triaged by sub teamtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
The text was updated successfully, but these errors were encountered:
askeksa
added
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
labels
Oct 12, 2023
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:
#53175#53737#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>
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.P3A lower priority bug or feature requesttriagedIssue has been triaged by sub teamtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
On the VM,
prints
whereas it should print
The outer
FutureOr
should normalize to declared non-nullable, since the type argument is nullable.The bug is also triggered by the test added in https://dart-review.googlesource.com/c/sdk/+/320821
The text was updated successfully, but these errors were encountered: