| 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 class A { | 5 class A { |
| 6 foo([a, b]) { | 6 x(p1, p2) { |
| 7 Expect.equals(0, a); | 7 print(p1 * p2); |
| 8 Expect.equals(1, b); | 8 if (p1 * p2 == 12) return; |
| 9 x("3", "4"); |
| 9 } | 10 } |
| 10 } | 11 } |
| 11 | 12 |
| 12 main() { | 13 main() => Expect.throws(() => new A().x(1, 2), |
| 13 A a = new A(); | 14 (e) => e is NoSuchMethodException); |
| 14 a.foo(a: 0, b: 1); | |
| 15 a.foo(b: 1, a: 0); | |
| 16 } | |
| OLD | NEW |