| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "package:expect/expect.dart"; | |
| 6 | |
| 7 var foo; | 5 var foo; |
| 8 bar() => foo(3, 99); | 6 bar() => foo(3, 99); |
| 9 gee(f) => foo(fun: f); | 7 gee(f) => foo(fun: f); |
| 10 | 8 |
| 11 get foo2 => foo; | 9 get foo2 => foo; |
| 12 bar2() => foo2(3, 99); | 10 bar2() => foo2(3, 99); |
| 13 gee2(f) => foo2(fun: f); | 11 gee2(f) => foo2(fun: f); |
| 14 | 12 |
| 15 globalTest() { | 13 globalTest() { |
| 16 foo = () => 499; | 14 foo = () => 499; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 A.foo = (x, y) => x + y; | 49 A.foo = (x, y) => x + y; |
| 52 Expect.equals(102, A.bar2()); | 50 Expect.equals(102, A.bar2()); |
| 53 A.foo = ({fun: null}) => fun(41); | 51 A.foo = ({fun: null}) => fun(41); |
| 54 Expect.equals(42, A.gee2((x) => x + 1)); | 52 Expect.equals(42, A.gee2((x) => x + 1)); |
| 55 } | 53 } |
| 56 | 54 |
| 57 main() { | 55 main() { |
| 58 globalTest(); | 56 globalTest(); |
| 59 staticTest(); | 57 staticTest(); |
| 60 } | 58 } |
| OLD | NEW |