Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library function_expression_test; | |
| 6 | |
| 7 main() { | |
| 8 var f = (int m, int n) => print('${m++}$n'); | |
| 9 var a1 = 3; | |
| 10 var a2 = 7; | |
| 11 | |
| 12 f(a1, a2); | |
| 13 | |
| 14 int foo(int f1, String f2) { | |
| 15 print('$f1, $f2'); | |
| 16 a1++; | |
| 17 return a1; | |
| 18 } | |
| 19 | |
| 20 var m = foo(1, 'test'); | |
| 21 print(m); | |
| 22 print(a1); | |
| 23 | |
| 24 int bar(int i) { | |
| 25 if (i < 0 || i == 0) return 0; | |
| 26 return bar(--i); | |
| 27 } | |
| 28 | |
| 29 print(bar(5)); | |
| 30 } | |
| OLD | NEW |