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

Unified Diff: pkg/lookup_map/lib/lookup_map.dart

Issue 1312943007: Add version validation for LookupMap, also add unittest directly in LookupMap. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months 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: pkg/lookup_map/lib/lookup_map.dart
diff --git a/pkg/lookup_map/lib/lookup_map.dart b/pkg/lookup_map/lib/lookup_map.dart
index 609f854288d10088c23cfc397cbda82b4ea84aeb..0c03094e680e8590419a0c537798c054e9aef8c5 100644
--- a/pkg/lookup_map/lib/lookup_map.dart
+++ b/pkg/lookup_map/lib/lookup_map.dart
@@ -91,3 +91,10 @@ class LookupMap<K, V> {
/// An expando that stores a flatten version of a [LookupMap], this is
/// computed and stored the first time the map is accessed.
final _flatMap = new Expando('_flat_map');
+
+/// Internal constant that matches the version in the pubspec. This is used by
+/// dart2js to ensure that optimizations are only enabled on known versions of
+/// this code.
+// Note: this needs to be kept in sync with the pubspec, otherwise
+// test/version_check_test would fail.
+final _version = '0.0.1';

Powered by Google App Engine
This is Rietveld 408576698