Index: sdk/lib/_internal/js_runtime/lib/string_helper.dart |
diff --git a/sdk/lib/_internal/js_runtime/lib/string_helper.dart b/sdk/lib/_internal/js_runtime/lib/string_helper.dart |
index 8ec6c479974d43341439103b8a7cc1f21e16484c..78a0980cff9d66b8d7542f577746a3a89a4bcb45 100644 |
--- a/sdk/lib/_internal/js_runtime/lib/string_helper.dart |
+++ b/sdk/lib/_internal/js_runtime/lib/string_helper.dart |
@@ -142,7 +142,7 @@ stringReplaceAllUnchecked(receiver, pattern, replacement) { |
if (pattern is String) { |
if (pattern == "") { |
if (receiver == "") { |
- return replacement; |
+ return JS('String', '#', replacement); // help type inference. |
Siggi Cherem (dart-lang)
2017/01/23 17:45:04
would it also work if we change the check in line
|
} else { |
StringBuffer result = new StringBuffer(''); |
int length = receiver.length; |