| Index: tests/language/inline_in_for_initializer_and_bailout_test.dart
|
| ===================================================================
|
| --- tests/language/inline_in_for_initializer_and_bailout_test.dart (revision 0)
|
| +++ tests/language/inline_in_for_initializer_and_bailout_test.dart (revision 0)
|
| @@ -0,0 +1,24 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +import "package:expect/expect.dart";
|
| +
|
| +var a = 42;
|
| +
|
| +inlineMe() {
|
| + // Add control flow to confuse the compiler.
|
| + if (a is int) {
|
| + print('a is int');
|
| + }
|
| + return a[0];
|
| +}
|
| +
|
| +main() {
|
| + a = [42];
|
| + // Make [main] recursive to force a bailout version.
|
| + if (false) main();
|
| + int i = 0;
|
| + for (i = inlineMe(); i < 42; i++);
|
| + Expect.equals(42, i);
|
| +}
|
|
|