Skip to content

Commit

Permalink
Use annotations on confuse() in null_test
Browse files Browse the repository at this point in the history
Verified no material code changes.

TBR=floitsch@google.com

Review URL: https://codereview.chromium.org/1511293003 .
  • Loading branch information
rakudrama committed Dec 9, 2015
1 parent 0e61315 commit e78c269
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/language/null_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit e78c269

Please sign in to comment.