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

Unified Diff: tests/language/null_test.dart

Issue 1511293003: Use annotations on confuse() in null_test (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/null_test.dart
diff --git a/tests/language/null_test.dart b/tests/language/null_test.dart
index 83ffd7b3d1b02f56293f7913b14ef7cd259fdda3..ecb2e002d690ebac37cf50b5a8cb044b15ec5b37 100644
--- a/tests/language/null_test.dart
+++ b/tests/language/null_test.dart
@@ -36,13 +36,9 @@ class Generic2<T, S> {
// Magic incantation to avoid the compiler recognizing the constant values
// at compile time. If the result is computed at compile time, the dynamic code
// will not be tested.
-confuse(x) {
- try {
- if (new DateTime.now().millisecondsSinceEpoch == 42) x = 42;
- throw [x];
- } on dynamic catch (e) { return e[0]; }
- return 42;
-}
+@NoInline()
+@AssumeDynamic()
+confuse(x) => x;
void main() {
for (int i = 0; i < 10; i++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698