Index: tests/language/src/LivenessTest.dart |
diff --git a/tests/language/src/LivenessTest.dart b/tests/language/src/LivenessTest.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..08d84e7357ebb8539371638b34180e47f2cf5021 |
--- /dev/null |
+++ b/tests/language/src/LivenessTest.dart |
@@ -0,0 +1,14 @@ |
+// Copyright (c) 2012, 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. |
+// Dart test program testing closures. |
+ |
+foo(x) { |
+ var y = x; |
+ for (int i = 0; i < 10; i++) x++; |
+ return y; |
+} |
+ |
+main() { |
+ Expect.equals(499, foo(499)); |
+} |