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

Unified Diff: frog/corejs.dart

Issue 8677018: add with strings bug fix (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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 | « no previous file | frog/frogsh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/corejs.dart
diff --git a/frog/corejs.dart b/frog/corejs.dart
index 5fe74d433586f46a6ef7954dcf7385448e4e06f6..6193659a8853094db044fecffe1310a7317e32df 100644
--- a/frog/corejs.dart
+++ b/frog/corejs.dart
@@ -83,11 +83,12 @@ function $negate(x) {
}""";
break;
+ // This relies on JS's string "+" to match Dart's.
case '\$add':
code = @"""
function $add(x, y) {
return ((typeof(x) == 'number' && typeof(y) == 'number') ||
- (typeof(x) == 'string' && typeof(y) == 'string'))
+ (typeof(x) == 'string'))
? x + y : x.$add(y);
}""";
break;
« no previous file with comments | « no previous file | frog/frogsh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698