Chromium Code Reviews| Index: runtime/vm/parser.cc |
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
| index ed49a3ccf32951909966398f40713e130128282e..3be4dfeaf61f1888876fa40aeda0f207734e0a15 100644 |
| --- a/runtime/vm/parser.cc |
| +++ b/runtime/vm/parser.cc |
| @@ -11859,12 +11859,17 @@ bool Parser::ParsingStaticMember() const { |
| const AbstractType* Parser::ReceiverType(const Class& cls) { |
| ASSERT(!cls.IsNull()); |
| - const TypeArguments& type_arguments = TypeArguments::Handle( |
| - Z, |
| + AbstractType& type = AbstractType::ZoneHandle(Z, cls.CanonicalType()); |
| + if (!type.IsNull()) { |
| + // This requirement is embedded in 'CacnonicalType' function. |
|
hausner
2015/08/19 17:45:03
Cacnonical -> Canonical
srdjan
2015/08/19 17:55:25
Done.
|
| + ASSERT((cls.NumTypeArguments() == 0) && !cls.IsSignatureClass()); |
| + return &type; |
| + } |
| + |
| + const TypeArguments& type_arguments = TypeArguments::Handle(Z, |
| (cls.NumTypeParameters() > 0) ? |
| cls.type_parameters() : TypeArguments::null()); |
| - AbstractType& type = AbstractType::ZoneHandle( |
| - Z, Type::New(cls, type_arguments, cls.token_pos())); |
| + type = Type::New(cls, type_arguments, cls.token_pos()); |
| if (cls.is_type_finalized()) { |
| type ^= ClassFinalizer::FinalizeType( |
| cls, type, ClassFinalizer::kCanonicalizeWellFormed); |