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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_string.dart

Issue 12441003: Rename String.concat to operator+. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 9 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: sdk/lib/_internal/compiler/implementation/lib/js_string.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
index f5f27038c3a89b802b190844d48c290e52699242..1b8fef0c3820b80b461b3990df7112552fd31cf5 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
@@ -25,11 +25,13 @@ class JSString implements String, JSIndexable {
return allMatchesInStringUnchecked(this, str);
}
- String concat(String other) {
+ String operator +(String other) {
if (other is !String) throw new ArgumentError(other);
return JS('String', r'# + #', this, other);
}
+ String concat(String other) => this + other;
+
bool endsWith(String other) {
checkString(other);
int otherLength = other.length;
« no previous file with comments | « samples/swarm/swarm_ui_lib/touch/FxUtil.dart ('k') | sdk/lib/_internal/compiler/implementation/tree/dartstring.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698