[VM kernel] Add missing type parameter finalization in type reader.

Change-Id: I09ae8dc759a4fb4d98c0c71ddda7d38de3525324
Reviewed-on: https://dart-review.googlesource.com/68431
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index d999de1..586eedb 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -2840,6 +2840,10 @@
           result_ ^=
               TypeArguments::Handle(Z, active_class_->member->type_parameters())
                   .TypeAt(parameter_index);
+          if (finalize_) {
+            result_ =
+                ClassFinalizer::FinalizeType(*active_class_->klass, result_);
+          }
         } else {
           result_ ^= Type::DynamicType();
         }
@@ -2857,6 +2861,9 @@
       } else {
         result_ ^= Type::DynamicType();
       }
+      if (finalize_) {
+        result_ = ClassFinalizer::FinalizeType(*active_class_->klass, result_);
+      }
       return;
     }
     parameter_index -= active_class_->local_type_parameters->Length();