Skip to content

Commit fc8a6d9

Browse files
creliercommit-bot@chromium.org
authored andcommitted
[VM/compiler] Dereference TypeRef literal when propagating constants.
This fixes #42753 Change-Id: Ibb179c0cf45c77d5b1f29a75ca2dea88d449ed99 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155503 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Régis Crelier <[email protected]>
1 parent 0689ec5 commit fc8a6d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runtime/vm/compiler/backend/constant_propagator.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,9 @@ void ConstantPropagator::VisitInstantiateType(InstantiateTypeInstr* instr) {
10241024
AbstractType& result = AbstractType::Handle(
10251025
Z, instr->type().InstantiateFrom(
10261026
instantiator_type_args, function_type_args, kAllFree, Heap::kOld));
1027+
if (result.IsTypeRef()) {
1028+
result = TypeRef::Cast(result).type();
1029+
}
10271030
ASSERT(result.IsInstantiated());
10281031
result = result.Canonicalize();
10291032
SetValue(instr, result);

0 commit comments

Comments
 (0)