| 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 | |
| 7 // Checks that noSuchMethod is resolved in the super class and not in the | 5 // Checks that noSuchMethod is resolved in the super class and not in the |
| 8 // current class. | 6 // current class. |
| 9 | 7 |
| 10 class C { | 8 class C { |
| 11 E e = new E(); | 9 E e = new E(); |
| 12 | 10 |
| 13 bool noSuchMethod(InvocationMirror im) { | 11 bool noSuchMethod(InvocationMirror im) { |
| 14 if (im.memberName == 'foo') { | 12 if (im.memberName == 'foo') { |
| 15 return im.positionalArguments.isEmpty && | 13 return im.positionalArguments.isEmpty && |
| 16 im.namedArguments.isEmpty && | 14 im.namedArguments.isEmpty && |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 bool boz(int a, {int c}) => a == 1 && c == 2; | 58 bool boz(int a, {int c}) => a == 1 && c == 2; |
| 61 } | 59 } |
| 62 | 60 |
| 63 main() { | 61 main() { |
| 64 var d = new D(); | 62 var d = new D(); |
| 65 Expect.isTrue(d.test1()); | 63 Expect.isTrue(d.test1()); |
| 66 Expect.isTrue(d.test2()); | 64 Expect.isTrue(d.test2()); |
| 67 Expect.isTrue(d.test3()); | 65 Expect.isTrue(d.test3()); |
| 68 Expect.isTrue(d.test4()); | 66 Expect.isTrue(d.test4()); |
| 69 } | 67 } |
| OLD | NEW |