Chromium Code Reviews| Index: runtime/vm/kernel_binary_flowgraph.cc |
| diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc |
| index 274a4654bbe6664d5add3cdc6e39fd360e602184..42afa915e0b1aa894a2cbe6af70044144674b823 100644 |
| --- a/runtime/vm/kernel_binary_flowgraph.cc |
| +++ b/runtime/vm/kernel_binary_flowgraph.cc |
| @@ -2534,6 +2534,19 @@ void StreamingConstantEvaluator::EvaluateConstructorInvocationInternal() { |
| const TypeArguments* type_arguments = |
| TranslateTypeArguments(constructor, &klass); // read argument types. |
| + if (klass.NumTypeArguments() > 0 && !klass.IsGeneric()) { |
|
jensj
2017/09/04 07:56:42
This code is basically just a copy-pasta from the
kustermann
2017/09/04 10:21:34
It seems correct, since NumTypeArguments (as oppos
|
| + Type& type = Type::ZoneHandle(Z, T.ReceiverType(klass).raw()); |
| + // TODO(27590): Can we move this code into [ReceiverType]? |
| + type ^= ClassFinalizer::FinalizeType(*builder_->active_class()->klass, type, |
| + ClassFinalizer::kFinalize); |
| + ASSERT(!type.IsMalformedOrMalbounded()); |
| + |
| + TypeArguments& canonicalized_type_arguments = |
| + TypeArguments::ZoneHandle(Z, type.arguments()); |
| + canonicalized_type_arguments = canonicalized_type_arguments.Canonicalize(); |
| + type_arguments = &canonicalized_type_arguments; |
| + } |
| + |
| // Prepare either the instance or the type argument vector for the constructor |
| // call. |
| Instance* receiver = NULL; |