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

Unified Diff: sdk/lib/core/date.dart

Issue 11369210: Make RegExp constructor non-const. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: sdk/lib/core/date.dart
diff --git a/sdk/lib/core/date.dart b/sdk/lib/core/date.dart
index 9f4e9178a565fb30da6c909050b8ef83f366910e..3ce0b0786bd5337fb21b24eea7b357038234a894 100644
--- a/sdk/lib/core/date.dart
+++ b/sdk/lib/core/date.dart
@@ -257,7 +257,7 @@ class _DateImpl implements Date {
// - "20120227"
// - "2012-02-27T14Z"
// - "-123450101 00:00:00 Z" // In the year -12345.
- final RegExp re = const RegExp(
+ final RegExp re = new RegExp(
r'^([+-]?\d?\d\d\d\d)-?(\d\d)-?(\d\d)' // The day part.
r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(.\d{1,6})?)?)? ?([zZ])?)?$');
Match match = re.firstMatch(formattedString);

Powered by Google App Engine
This is Rietveld 408576698