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

Unified Diff: tests/language/const_map_test.dart

Issue 1518553002: Use annotations on confuse() functions (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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: tests/language/const_map_test.dart
diff --git a/tests/language/const_map_test.dart b/tests/language/const_map_test.dart
index 96db1d6a86477c93464f50d3c71ca44b632ccd2a..9cc0d5b40f9874d1fbd304e251edbe05456e366c 100644
--- a/tests/language/const_map_test.dart
+++ b/tests/language/const_map_test.dart
@@ -7,11 +7,8 @@ import "package:expect/expect.dart";
/// Returns its argument.
///
/// Prevents static optimizations and inlining.
-confuse(x) {
- // DateTime.now() cannot be predicted statically.
- if (new DateTime.now() == 42) return confuse(2);
- return x;
-}
+@NoInline() @AssumeDynamic()
+confuse(x) => x;
main() {
// Make sure that const maps use the == operator and not identical. The

Powered by Google App Engine
This is Rietveld 408576698