| Index: tests/language/no_such_method_test.dart
|
| diff --git a/tests/language/no_such_method_test.dart b/tests/language/no_such_method_test.dart
|
| index bd41878be69134dd9e80f987829bd0024b7a9772..138df66ea628cc26c15b1b3100b9f65be51c52b3 100644
|
| --- a/tests/language/no_such_method_test.dart
|
| +++ b/tests/language/no_such_method_test.dart
|
| @@ -5,20 +5,22 @@
|
|
|
| class NoSuchMethodTest {
|
|
|
| - foo({a = 10, b = 20}) {
|
| + foo([a = 10, b = 20]) {
|
| return (10 * a) + b;
|
| }
|
|
|
| - noSuchMethod(InvocationMirror im) {
|
| - Expect.equals("moo", im.memberName);
|
| - Expect.equals(0, im.positionalArguments.length);
|
| - Expect.equals(1, im.namedArguments.length);
|
| - return foo(b:im.namedArguments["b"]);
|
| + noSuchMethod(String name, List args) {
|
| + Expect.equals("moo", name);
|
| + Expect.equals(1, args.length);
|
| + return foo(args[0]);
|
| }
|
|
|
| static testMain() {
|
| var obj = new NoSuchMethodTest();
|
| - Expect.equals(199, obj.moo(b:99)); // obj.NoSuchMethod called here.
|
| + Expect.equals(1010, obj.moo(b:99)); // obj.NoSuchMethod called here.
|
| + // After we remove the rest argument and change the signature of
|
| + // noSuchMethod to be compatible with named arguments, we can expect the
|
| + // correct value of 199 instead of 1010.
|
| }
|
| }
|
|
|
|
|