mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 14:32:49 +00:00
7fed1dd2c7
R=kasperl@google.com Review URL: https://codereview.chromium.org//16004005 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23337 260f80e4-7a28-3924-810f-c04153c831b5
25 lines
564 B
Dart
25 lines
564 B
Dart
// 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);
|
|
}
|