Index: pkg/kernel/testcases/interpreter/function_expressions_test.dart |
diff --git a/pkg/kernel/testcases/interpreter/function_expressions_test.dart b/pkg/kernel/testcases/interpreter/function_expressions_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e009f5f1f20a664a4ba322ccf41fc107afc69838 |
--- /dev/null |
+++ b/pkg/kernel/testcases/interpreter/function_expressions_test.dart |
@@ -0,0 +1,30 @@ |
+// Copyright (c) 2017, 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. |
+ |
+library function_expression_test; |
+ |
+main() { |
+ var f = (int m, int n) => print('${m++}$n'); |
+ var a1 = 3; |
+ var a2 = 7; |
+ |
+ f(a1, a2); |
+ |
+ int foo(int f1, String f2) { |
+ print('$f1, $f2'); |
+ a1++; |
+ return a1; |
+ } |
+ |
+ var m = foo(1, 'test'); |
+ print(m); |
+ print(a1); |
+ |
+ int bar(int i) { |
+ if (i < 0 || i == 0) return 0; |
+ return bar(--i); |
+ } |
+ |
+ print(bar(5)); |
+} |