OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 foo() => 123; | 7 foo() => 123; |
6 | 8 |
7 void testShadowingScope1() { | 9 void testShadowingScope1() { |
8 var foo = foo(); | 10 var foo = foo(); |
9 Expect.equals(123, foo); | 11 Expect.equals(123, foo); |
10 } | 12 } |
11 | 13 |
12 void testShadowingScope2() { | 14 void testShadowingScope2() { |
13 { | 15 { |
14 var foo = foo() + 444; | 16 var foo = foo() + 444; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 63 } |
62 | 64 |
63 main() { | 65 main() { |
64 testShadowingScope1(); | 66 testShadowingScope1(); |
65 testShadowingScope2(); | 67 testShadowingScope2(); |
66 testShadowingCapture1(); | 68 testShadowingCapture1(); |
67 testShadowingCapture2(); | 69 testShadowingCapture2(); |
68 new BlockScopeTest1().testShadowingInstanceVar(); | 70 new BlockScopeTest1().testShadowingInstanceVar(); |
69 BlockScopeTest1.testShadowingStatic(); | 71 BlockScopeTest1.testShadowingStatic(); |
70 } | 72 } |
OLD | NEW |