Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index 9cb7dd44626b9803403ba5409e620abfb7dbc75d..b639e5e60627669e55fa7c205264f3fb18e3c0d7 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -10278,15 +10278,12 @@ AstNode* Parser::ThrowTypeError(TokenPosition type_pos, |
type_pos, Integer::ZoneHandle(Z, Integer::New(type_pos.value())))); |
// Src value argument. |
arguments->Add(new(Z) LiteralNode(type_pos, Object::null_instance())); |
- // Dst type name argument. |
- arguments->Add(new(Z) LiteralNode(type_pos, Symbols::Malformed())); |
+ // Dst type argument. |
+ arguments->Add(new(Z) LiteralNode(type_pos, type)); |
// Dst name argument. |
arguments->Add(new(Z) LiteralNode(type_pos, Symbols::Empty())); |
- // Malformed type error or malbounded type error. |
- const Error& error = Error::Handle(Z, type.error()); |
- ASSERT(!error.IsNull()); |
- arguments->Add(new(Z) LiteralNode(type_pos, String::ZoneHandle(Z, |
- Symbols::New(error.ToErrorCString())))); |
+ // Bound error msg argument. |
+ arguments->Add(new(Z) LiteralNode(type_pos, Object::null_instance())); |
return MakeStaticCall(Symbols::TypeError(), method_name, arguments); |
} |
@@ -13288,7 +13285,7 @@ AstNode* Parser::ParseNewOperator(Token::Kind op_kind) { |
(la3 == Token::kLT) || (la3 == Token::kPERIOD) || (la3 == Token::kHASH); |
LibraryPrefix& prefix = LibraryPrefix::ZoneHandle(Z); |
- AbstractType& type = AbstractType::Handle(Z, |
+ AbstractType& type = AbstractType::ZoneHandle(Z, |
ParseType(ClassFinalizer::kCanonicalizeWellFormed, |
allow_deferred_type, |
consume_unresolved_prefix, |
@@ -13417,7 +13414,7 @@ AstNode* Parser::ParseNewOperator(Token::Kind op_kind) { |
NULL); // No existing function. |
} else if (constructor.IsRedirectingFactory()) { |
ClassFinalizer::ResolveRedirectingFactory(type_class, constructor); |
- Type& redirect_type = Type::Handle(Z, constructor.RedirectionType()); |
+ Type& redirect_type = Type::ZoneHandle(Z, constructor.RedirectionType()); |
if (!redirect_type.IsMalformedOrMalbounded() && |
!redirect_type.IsInstantiated()) { |
// The type arguments of the redirection type are instantiated from the |