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

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: Remove left-over List change in comment. Created 8 years, 2 months 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
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 42ba0b5ee54dde6dc0d76b9b32d1e51871443c8e..5683fcf69247170bb224c5d59c5d720647fcec94 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -5049,7 +5049,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) &&
@@ -8603,7 +8603,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) {
@@ -8614,7 +8614,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'");
}
}

Powered by Google App Engine
This is Rietveld 408576698