Chromium Code Reviews

Unified Diff: pkg/intl/lib/src/date_format_helpers.dart

Issue 11410033: Make RegExp's constructor non-const. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move out RegExp constructors to top-level elements. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: pkg/intl/lib/src/date_format_helpers.dart
diff --git a/pkg/intl/lib/src/date_format_helpers.dart b/pkg/intl/lib/src/date_format_helpers.dart
index 7def10b5984ab7fe8d4d3da6dd0b149cc5289e05..e47c2cb7bda7ef31ce9c52ea330d5b7ba5facf33 100644
--- a/pkg/intl/lib/src/date_format_helpers.dart
+++ b/pkg/intl/lib/src/date_format_helpers.dart
@@ -133,7 +133,7 @@ class _Stream {
* Assuming that the contents are characters, read as many digits as we
* can see and then return the corresponding integer. Advance the stream.
*/
- var digitMatcher = const RegExp(r'\d+');
+ var digitMatcher = new RegExp(r'\d+');
int nextInteger() {
var string = digitMatcher.stringMatch(rest());
if (string == null || string.isEmpty) return null;

Powered by Google App Engine