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 | |
7 // Bind a method to a variable that can be invoked as a function | 5 // Bind a method to a variable that can be invoked as a function |
8 | 6 |
9 class A { | 7 class A { |
10 int a; | 8 int a; |
11 | 9 |
12 static var func; | 10 static var func; |
13 | 11 |
14 A(this.a) { } | 12 A(this.a) { } |
15 | 13 |
16 static foo() { return 4; } | 14 static foo() { return 4; } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 138 } |
141 | 139 |
142 static testMain() { | 140 static testMain() { |
143 test(); | 141 test(); |
144 } | 142 } |
145 } | 143 } |
146 | 144 |
147 main() { | 145 main() { |
148 MethodBindingTest.testMain(); | 146 MethodBindingTest.testMain(); |
149 } | 147 } |
OLD | NEW |