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

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: Created 7 years, 10 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 c271e1606fea07b7d644072a6cc41ca19440167e..d917230d923e3ca0f7a9f14f3b4df6700d6caa4d 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 {
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;

Powered by Google App Engine
This is Rietveld 408576698