| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index ed49a3ccf32951909966398f40713e130128282e..a8d9795b1362a39303cd0b6c99f1a762c960d7bc 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 'CanonicalType' function.
|
| + 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);
|
|
|