OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
6 | 6 |
7 class Fna { | 7 class Fna { |
8 var z = 2; | 8 var z = 2; |
9 | 9 |
10 call(y) { | 10 call(y) { |
11 return () => 6 + y + z + this.z; | 11 return () => 6 + y + z + this.z; |
(...skipping 15 matching lines...) Expand all Loading... |
27 var x = 5; | 27 var x = 5; |
28 foo((y) { | 28 foo((y) { |
29 var z = 2; | 29 var z = 2; |
30 return () { | 30 return () { |
31 x = 4 + y + z; | 31 x = 4 + y + z; |
32 }; | 32 }; |
33 }); | 33 }); |
34 Expect.equals(9, x); | 34 Expect.equals(9, x); |
35 Expect.equals(13, foo(new Fna())); | 35 Expect.equals(13, foo(new Fna())); |
36 } | 36 } |
OLD | NEW |