Index: tests/corelib_2/string_replace_test.dart |
diff --git a/tests/corelib_2/string_replace_test.dart b/tests/corelib_2/string_replace_test.dart |
index 4599c6e1ffb37e3ee79eb10edb860544b2b5bf02..65e59e60c16cea46b871ff396c4bf86a056c0f76 100644 |
--- a/tests/corelib_2/string_replace_test.dart |
+++ b/tests/corelib_2/string_replace_test.dart |
@@ -175,7 +175,10 @@ main() { |
Expect.equals( |
"foo-$o", |
"foo-bar".replaceFirstMapped("bar", (v) { |
- return o; |
+ // TODO(jmesserly): in strong mode, this function must return a string. |
+ // If we want to allow any Object, we'll have to fix the API signature. |
+ // See https://github.com/dart-lang/sdk/issues/30248. |
+ return '$o'; |
})); |
for (var string in ["", "x", "foo", "x\u2000z"]) { |