Skip to content

Commit 7ba8625

Browse files
alexmarkovCommit Queue
authored andcommitted
[vm,dyn_modules] Normalize FutureOr types when reading bytecode
TEST=ci (language/nnbd/type_equality/futureOr_normalization_test) Change-Id: If2a008150f2dac2c278c11c0aea0af7a010c9e80 Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444200 Reviewed-by: Tess Strickland <[email protected]> Commit-Queue: Alexander Markov <[email protected]>
1 parent 53defca commit 7ba8625

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runtime/vm/bytecode_reader.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,9 +1418,10 @@ ObjectPtr BytecodeReaderHelper::ReadType(intptr_t tag,
14181418
}
14191419
const TypeArguments& type_arguments =
14201420
TypeArguments::CheckedHandle(Z, ReadObject());
1421-
const Type& type =
1422-
Type::Handle(Z, Type::New(cls, type_arguments, nullability));
1421+
AbstractType& type =
1422+
AbstractType::Handle(Z, Type::New(cls, type_arguments, nullability));
14231423
type.SetIsFinalized();
1424+
type = type.NormalizeFutureOrType(Heap::kOld);
14241425
return type.Canonicalize(thread_);
14251426
}
14261427
case kFunctionType: {

0 commit comments

Comments
 (0)