| 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 |
| 5 closure0() { | 7 closure0() { |
| 6 var x = 499; | 8 var x = 499; |
| 7 // TODO(floitsch): remove name from functions. | 9 // TODO(floitsch): remove name from functions. |
| 8 var f = fun() { return x; }; | 10 var f = fun() { return x; }; |
| 9 Expect.equals(499, f()); | 11 Expect.equals(499, f()); |
| 10 } | 12 } |
| 11 | 13 |
| 12 class A { | 14 class A { |
| 13 closure1() { | 15 closure1() { |
| 14 var x = 499; | 16 var x = 499; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 new A().closure1(); | 84 new A().closure1(); |
| 83 closure2(); | 85 closure2(); |
| 84 closure3(); | 86 closure3(); |
| 85 closure4(); | 87 closure4(); |
| 86 closure5(); | 88 closure5(); |
| 87 new A2().closure6(); | 89 new A2().closure6(); |
| 88 closure7(); | 90 closure7(); |
| 89 closure8(); | 91 closure8(); |
| 90 closure9(); | 92 closure9(); |
| 91 } | 93 } |
| OLD | NEW |