dart-sdk/runtime/docs
Alexander Markov 66f1dee48c [vm] Runtime type check in await
'await e' should check that e is a Future<flatten(S)>, where S is a
static type of e before awaiting e. If e is not a Future<flatten(S)>,
then 'await e' should await Future.value(e) instead of e. So futures
of incompatible type are not awaited and soundness is not violated.

TEST=tests/language/async/await_type_check_test.dart
(Based on https://dart-review.git.corp.google.com/c/sdk/+/267422.)

Fixes https://github.com/dart-lang/sdk/issues/50529
Part of https://github.com/dart-lang/sdk/issues/49396

Change-Id: Ia418db1be6736710abc9be87d95584c50cbc677e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273002
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-12-07 22:46:22 +00:00
..
compiler [vm/inliner] Tweak inlining heuristic, improve List.of inlining. 2022-08-15 21:14:36 +00:00
images [vm/docs] Publish "Introduction to Dart VM" source and build tools. 2020-02-04 09:04:32 +00:00
infra [vm/compiler] Fix DelayAllocations pass 2022-03-04 10:00:41 +00:00
aot_binary_size_analysis.md [build] Remove runtime_kernel target from GN build 2021-08-13 10:09:41 +00:00
async.md [vm] Runtime type check in await 2022-12-07 22:46:22 +00:00
dwarf_stack_traces.md [vm] Remove "Impl" suffix from VM implementation classes. 2022-11-18 21:42:59 +00:00
gc.md [vm] Implement NativeFinalizer 2022-03-26 09:41:21 +00:00
glossary.md [vm] Add a glossary of terms used by the VM. 2022-07-21 19:45:15 +00:00
index.md [vm] Cleanup old async/async*/sync* implementation from kernel 2022-07-11 18:12:41 +00:00
pragmas.md [vm/inliner] Tweak inlining heuristic, improve List.of inlining. 2022-08-15 21:14:36 +00:00
snapshot_profiling.md Fix typo in snapshot_profiling.md. heapsnaphsot -> heapsnapshot 2019-11-25 15:58:15 +00:00
types.md master branch to main 2021-09-15 06:22:23 +00:00