Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(926)

Unified Diff: runtime/vm/parser.cc

Issue 11085003: Convert String to a class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged to tip of bleeding_edge. Updated test expecteation Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 668c0bfddef49843939de8856b33e7a80facbded..a1d212a9f3416f20b148f6641504d805ce839186 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -5189,7 +5189,7 @@ bool Parser::IsSimpleLiteral(const AbstractType& type, Instance* value) {
*value = CurrentDoubleLiteral();
return true;
} else if ((CurrentToken() == Token::kSTRING) &&
- (no_check || type.IsStringInterface())) {
+ (no_check || type.IsStringType())) {
*value = CurrentLiteral()->raw();
return true;
} else if ((CurrentToken() == Token::kTRUE) &&
@@ -8861,7 +8861,7 @@ AstNode* Parser::ParseMapLiteral(intptr_t type_pos,
"the key type and the value type");
}
TypeArguments& type_array = TypeArguments::Handle(TypeArguments::New(2));
- type_array.SetTypeAt(0, Type::Handle(Type::StringInterface()));
+ type_array.SetTypeAt(0, Type::Handle(Type::StringType()));
type_array.SetTypeAt(1, value_type);
map_type_arguments = type_array.raw();
} else if (map_type_arguments.Length() > 2) {
@@ -8872,7 +8872,7 @@ AstNode* Parser::ParseMapLiteral(intptr_t type_pos,
const AbstractType& key_type =
AbstractType::Handle(map_type_arguments.TypeAt(0));
value_type = map_type_arguments.TypeAt(1);
- if (!key_type.IsStringInterface()) {
+ if (!key_type.IsStringType()) {
ErrorMsg(type_pos, "the key type of a map literal must be 'String'");
}
}
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698